The triangle formed by the flagpole and its shadow is similar to the triangle formed by the building and its shadow. In similar triangles the ratio between corresponding sides is the same.
Use the given lengths and in the equation above and find the height of the building:
Then, the building is 162 feet tall