From the above pictorial illustration we can seen that,
$\color{maroon}{\bigtriangleup{ABC}} \text{ & } \color{maroon}{\bigtriangleup{DEC}}$ are similar triangle,
As, $\color{blue}{\angle{ACB}} = \color{blue}{\angle{DCE}}$
& $\color{gold}{\measuredangle{ABC}} =$ $\color{gold}{90^\circ}$ , $\color{gold}{\measuredangle{DEC}} =$ $\color{gold}{90^\circ}$
$∴\hspace{0.1cm} \color{maroon}{\bigtriangleup{ABC}} \equiv\hspace{0.1cm} \color{maroon}{\bigtriangleup{DEC}}$
Now,
$\dfrac{AB}{BC} = \dfrac{DE}{EC}$
Taking $EC = x$ and $AB = y$
$\dfrac{y}{30} = \dfrac{4}{x}$
Or, $y = \dfrac{120}{x}$
Differentiate both side w.r.t $t$
$\dfrac{dy}{dt} = \dfrac{-120\dfrac{dx}{dt}}{x^{2}}$ $\hspace{2cm}\color{orange}{[\dfrac{d}{dx}(\dfrac{u}{v}) = \dfrac{v\dfrac{du}{dx} -u\dfrac{dv}{dx}}{v^{2}}]}$
As, $x = 30-5 = 25$
Or, $\dfrac{dy}{dt} = \dfrac{-120(3)}{25^{2}}$
Or, $\color{lightblue}{\dfrac{dy}{dt} = -0.576 ft/s \approx -0.5ft/s}$
$∴ \color{green}{\text{ The shadow of man is shrinking at the rate of 0.5 ft/s when he is 5 ft. from the building.}}$
$\color{red}{\text{If we get,}}$ $\color{red}{\dfrac{dy}{dt} = + 0.576 \hspace{0.1cm}ft/s}$,
$\color{red}{\text{then that would be mean that, the man is walking towards the light}}$
$\color{red}{\text{and hence, his shadow keeps on increasing.}}$