The proportion that can used to find the height of the building is
(person's height) / (building height) =
(distance between the person and point P) / (distance between the building and point P)
How to find the height of the building
The height of the building is solved using the principles of similar triangles
person's height / building height =
(distance between the person and point P) / (distance between the building and point P)
Substituting in to the equation results to
6 / x = 3 / 18
3x = 6 * 18
x = 6 x 18 / 3
x = 6 x 6
x = 36 ft