24.) The angle of elevation of a flagpole from a point level with its base is 45 degrees. from a point 20 ft. further away, the angle of elevation is 30 degrees. What is the hight of the flagpole to the nearest 0.1 ft.?

I did:

x*tan(45) = (x + 20)*tan(30)

x*tan(45) = x*tan(30) + 20tan(30)

x*tan(45) - x*tan(30) = + 20tan(30)

x(tan45 - tan30) = 20tan(45)

x = 20tan(30)/tan(45)-tan

x = 27.29

or is it:

x*tan(30) = (x - 20)*tan(45)

x*tan(30) = x*tan(45) -20tan(45)

x*tan(30) - tan(45) = -20tan(45)

x(tan30 - tan45) = -20tan(45)

x = -20tan(45)/tan(30) - tan(45)

x = 47.28

I don't know which one is right....