Step 1: Resolve the initial velocity.
Initial velocity \(u = 15 \, \text{m/s}\) is at an angle \(\theta = 30^\circ\) to the horizontal. The vertical component is:
\[
u_y = u \sin \theta = 15 \times \frac{1}{2} = 7.5 \, \text{m/s}
\]
The horizontal component is \(u_x = u \cos \theta = 15 \times \frac{\sqrt{3}}{2}\), but horizontal motion is not needed for height.
Step 2: Use vertical motion equation.
For vertical displacement \(y\) from the top of the building:
\[
y = u_y t + \frac{1}{2}(-g)t^2
\]
Here, \(y\) is negative since ball hits the ground below initial position, \(t = 3 \, \text{s}\), \(g = 10 \, \text{m/s}^2\):
\[
y = 7.5 \times 3 - \frac{1}{2} \cdot 10 \cdot 3^2
\]
Step 3: Calculate vertical displacement.
\[
y = 22.5 - 45 = -22.5 \, \text{m}
\]
Negative sign indicates the ball lands 22.5 m below the launch point.
Step 4: Interpret result.
Since the ball hits the ground, the magnitude of displacement corresponds to the height of the building:
\[
h = 22.5 \, \text{m}
\]
Step 5: Verify using motion concepts.
The time of flight \(t = 3\) s is consistent with vertical motion under gravity. The vertical initial velocity component \(u_y = 7.5 \, \text{m/s}\) and deceleration \(g = 10 \, \text{m/s}^2\) yield the correct height.
Step 6: Final conclusion.
Thus, the height of the building is:
\[
\boxed{22.5 \, \text{m}}
\]