The ladder is moving away from the wall at the bottom, namely dx/dt
at a rate of 0.5 m/s, now... when it's 6m away from the wall, it has been moving for 12seconds already then, at 0.5ms, you need 12s to get 6meters away, thus x = 6
the ladder is moving downwards, namely dy/dt
at a rate of 0.375 m/s, in 12seconds, it has moved then 4.5meters, thus y = 4.5
so hmmm, notice, the ladder is sliding down and away from the wall, but the ladder itself itself elongating or shrinking, so is a constant
let us use the pythagorean theorem for that, notice picture below
thus

pretty sure is very obvious :)