Hi Harsh.
Here's a diagram that shows what is happening here:
For a particular instant in time, you are given the speed of g (that is,^{dg }/_{dt}) and the distance g and asked to find the speed of h (that is,^{dh }/_{dt}).
You need to start by creating a timeindependent expression for h in terms of g. This is just the Pythagorean Theorem (ignore the 2 m measurement  it only applies at a particular time, but you can use the 4 m measurement since the ladder length is constant with respect to time).
Now you differentiate both sides of the equation with respect to time. You'll need to use the chain rule twice.
This gives you ^{dh }/_{dt } on one side of the equation, which is what you want to find, and an algebraic expression on the other side which has ^{dg }/_{dt } in it. The last step is to substitute in the values of ^{dg }/_{dt} and g that you are given for this instant in time and you'll have your numerical answer. Watch your signs carefully because h is shrinking and g is growing, so you'll need to interpret your signs appropriately!
Hope this helps,
Stephen La Rocque.
