From a point on a ground the angle of elevation from a tower is observed to be 60 degree. From a point on 40meter vertically above the first point of observation the angle of elevation from a tower is 30degree. Find the height of the tower and horizontal distance from the point of observation

My diagram:

A vertical line PQ, to show the tower, P at ground-level
Another vertical AB, the points of observation with A at ground-level
let AP = x
draw a horizontal from B to meet PQ at R

in triangle APQ
tan 60 = (h+40)/x
x = (h+40)/tan60

in triangle BRQ
tan30 = h/x
x = h/tan30 ***

(h+40)/tan60 = h/tan30
htan60 = htan30 + 40tan30
h(tan60 - tan30) = 40tan30
h = 40tan30/(tan60-tan3)
= ...

you do the button-pushing,
Once you have h, sub that back into ***
to get x

To find the height of the tower and the horizontal distance from the point of observation, we can use trigonometric ratios.

Let's assume the height of the tower is "h" and the horizontal distance from the point of observation is "d".

From the first point of observation:
We have the angle of elevation as 60 degrees and the vertical distance as 40 meters.

Using the trigonometric ratio tangent (tan), we can express the relationship between the angle of elevation and the height of the tower:

tan(60 degrees) = h / d

Since tan(60 degrees) is √3, we can rewrite the equation as:

√3 = h / d

From the second point of observation:
We have the angle of elevation as 30 degrees and the vertical distance as h + 40 meters (since the second point of observation is 40 meters above the first point).

Again, using the trigonometric ratio tangent (tan), we can express the relationship between the angle of elevation and the height of the tower:

tan(30 degrees) = (h + 40) / d

Since tan(30 degrees) is 1/√3, we can rewrite the equation as:

1/√3 = (h + 40) / d

Now we have two equations:

√3 = h / d ----(1)
1/√3 = (h + 40) / d ----(2)

We can solve these equations simultaneously to find the values of h and d.

We can start by multiplying equation (1) by 1/√3 to eliminate the square root:

(1/√3) * (√3) = (1/√3) * (h / d)

1 = h / (d * √3)

Now we can substitute this value of (√3) / √3 as "1" in equation (2):

1 = (h + 40) / d

We can multiply both sides by d to eliminate the denominator:

d = h + 40

Now we have a system of simultaneous equations:

1 = h / (d * √3) ----(3)
d = h + 40 ----(4)

Using equation (4), we can substitute (h + 40) instead of "d" in equation (3):

1 = h / ((h + 40) * √3)

Now we can solve this equation to find the value of h:

√3 = h / ((h + 40) * √3)

Cross-multiplying:

√3 * (h + 40) * √3 = h

3 * (h + 40) = h

3h + 120 = h

2h = -120

h = -60

This implies that the height of the tower is -60 meters. However, since height cannot be negative, this indicates that there is an error in the problem or in the calculations. Please double-check the given information and calculations to obtain the correct result.