i have two problems in my book that i cannot solve. They both involve the use of pythagoras. I'll post them here and show my steps, my problem here is finding the differentiable equation that i need.

we all know $\displaystyle \frac{DX}{Dt} = \frac{DX}{Dy} \times \frac{DY}{Dt}$ etc.

#1)

The top of a ladder 5 metres long is sliding down a vertical wall at a rate of 3 metres per second. Find the rate at which the base of the ladder is sliding away from the wall, in metres per second, when the base of the ladder is 4m away from the wall.

(so in this case $\displaystyle \frac{DY}{Dt} = 3$, and what they require is $\displaystyle \frac{DX}{Dt} $ The hypotenuse in this situation in the length of ladder which is 5m and the adjacent is 4m

i would draw a diagram if it was possible so apologies for that ,

i use pythagoras and find that $\displaystyle y^2 = \sqrt{5^2 - 4^2}$

but all i find is that $\displaystyle y = 2\sqrt2$

wheres the differentiable equation so that I can find $\displaystyle \frac{DX}{Dy}$ ???

#2) A weather balloon is rising vertically from horizontal ground at a rate of 5m/s. An observer is standing on the ground 300m from the point at which the balloon was released. At what rate in m/s is the distance between the observer and the balloon changing when the balloon is at a height 400m

(so $\displaystyle \frac{Dy}{Dt}$ is given at 5m/s the X is 300m, as I deemed the horizontal the X value and the Y value as the vertical, I do Pythagoras again and still not happening, I can’t complete the equation. I also just realized that I cannot recognize what equation their looking for)

the sad thing is i enjoy doing stuff like this, calculating real life sort of things and i can't even do it Any help would be greatly appreciated.