The initial height of snowman A is 39 inch and the initial height of snowman B is 60 inch. These are the heights at the time of sunrise. Also, at the time of sunrise, t = 0.
The height of snowman A will reduce by 3 inch every hour. So, after t hours, the height will reduce by 3t inch. So, after t hours, A(t) = 39 - 3t
Similarly, the height of snowman B will reduce by 6 inch every hour. So, after t hours, the height will reduce by 6t inch. So, after t hours, B(t) = 60 - 6t
You can use your calculator or a computer software like Desmos (desmos.com) to graph these functions. The intersection point of the the two graphs (7,18) will give you after how long they will reach the same height and what that height will be. Here, after 7 hours, both will be 18 inch tall.
To solve it analytically, we set,
A(t) = B(t)
⇒ 39 - 3t = 60 - 6t
⇒ 6t - 3t = 60 - 39
⇒ 3t = 21
∴ t = 7 hours.
Plugging in t = 7 in either A(t) or B(t), we get, A(7) = B(7) = 18 inch.