Measuring voltage output in a voltage divider
The numerator is the 15K resistor because you are measuring the voltage across R2 -- it is assumed the positive probe of the voltmeter is at "Voltage Out", and the negative probe of the meter (not shown) is at the bottom of R2 (the - side of the 9V battery).

The current through R2 is set up by ohm's law:

\$I = \frac{V}{R}\$, so \$I = \frac{9v}{12K + 15K}\$ = 333 µA

So the voltage across R2, using \$V = IR, V = 333 µA * 15K  = 5v\$

Combining the two equations, you get \$V = \frac{9v}{12K + 15K} * 15K\$

which is the same as the equation in the last line of your question: \$V = \frac{15K}{12K + 15K}*9v\$