(N/A) In the figure,$AB$ denotes the height of the building,$BD$ the flagstaff,and $P$ the given point. Note that there are two right-angled triangles,$\triangle PAB$ and $\triangle PAD$. We are required to find the length of the flagstaff,i.e.,$DB$,and the distance of the building from the point $P$,i.e.,$PA$.
Since we know the height of the building $AB = 10 \, m$,we will first consider the right $\triangle PAB$.
We have $\tan 30^{\circ} = \frac{AB}{AP}$.
i.e.,$\frac{1}{\sqrt{3}} = \frac{10}{AP}$.
Therefore,$AP = 10\sqrt{3} \, m$.
i.e.,the distance of the building from $P$ is $10 \times 1.732 = 17.32 \, m$.
Next,let us suppose the length of the flagstaff $BD = x \, m$. Then the total height $AD = (10 + x) \, m$.
Now,in right $\triangle PAD$,$\tan 45^{\circ} = \frac{AD}{AP} = \frac{10 + x}{10\sqrt{3}}$.
Since $\tan 45^{\circ} = 1$,we have $1 = \frac{10 + x}{10\sqrt{3}}$.
Therefore,$10\sqrt{3} = 10 + x$.
$x = 10\sqrt{3} - 10 = 10(\sqrt{3} - 1) = 10(1.732 - 1) = 10(0.732) = 7.32 \, m$.
Thus,the length of the flagstaff is $7.32 \, m$ and the distance of the building from $P$ is $17.32 \, m$.