Voltage divider rule. The supply voltage across the series resistor is 12V.