Answer:
The temperature at midnight was 26 degrees.
Explanation:
Let "x" be the temperature in midnight.
The temperature fell 14 degrees by 5 am.
Temperature at 5 am = x - 14
Temperature at 9 am doubled from what it was at 5 am.
So, temperature at 9 am = 2(x - 14)
It had risen another 8 degrees to 32 by noon.
So, temperature at noon
32 = 2(x - 14) + 8
Now we have to find the value of x.
Distribute 2 inside the parenthesis, we get
32 = 2x - 28 + 8
32 = 2x - 20
2x = 32 + 20
2x = 52
Dividing both sides by 2, we get

x = 26
Therefore, the temperature at midnight was 26 degrees.