the temperature was 2 degrees f. by midnight, the temperature has dropped 7 degrees f. what was the temparature at midnight

well, you just said it was 2° F

if you meant after the drop , then it was (2-7)°F or -5° F