Answer:
(a) 25.08 m
(b) 2.05 m
Step-by-step explanation:
Let the height of the building be 'h'.
Given:
Angle of projection is,
°
Initial speed is, 
Time of flight is, 
(a)
Consider the vertical motion of the brick.
Vertical component of initial velocity is given as:

Vertical displacement of the brick is equal to the height of the building.
So, vertical displacement =
(Negative sign implies downward motion)
Acceleration is due to gravity in the downward direction. So,
Acceleration is, 
Now, using the following equation of motion;

Therefore, the building is 25.08 m tall.
(b)
Let the maximum height be 'H'.
At maximum height, the vertical component of velocity is 0 as the brick stops temporarily in the vertical direction.
So, 
Now, using the following equation of motion, we have:

Therefore, the maximum height of the brick is 2.05 m.