\[\large 2x\frac{ dx }{ dt }+2y \frac{ dy }{ dt }=0\]
Since our derivative is with respect to t, Every time we differentiate a variable that is NOT t, we have to apply the chain rule multiplying by the d/dt term.
For example when we differentiate x^2, we get 2x, but a dx/dt will pop out also.

When you do these problems, one way to check your work is this...
You should get an answer that MAKES SENSE.
If the ladder is sliding down the wall in the y direction at 4 ft/s
Then our slide along the x direction should be a similar number.