The free-body diagram for the given situation can be drawn as:

Here,\(Mg\)is the force of the person,\(mg\)is the force of the ladder,\({F_{{\rm{Gy}}}}\)is the vertical component of the frictional force at the ground,\({F_{{\rm{Gx}}}}\)is the horizontal component of the frictional force at the ground,\({F_{\rm{W}}}\)is the reaction force exerted by the wall on the ladder,\({d_{\rm{x}}}\)is the horizontal distance of the person, and\({d_{\rm{y}}}\)is the vertical distance of the person.
The person's force \(\left( {Mg} \right)\) acting downward on the ladder gives a torque in the clockwise direction about the junction point with the ground, with lever arm \({d_{\rm{x}}}\). The only force creating torque in the counterclockwise direction about that same point is the \({F_{\rm{w}}}\).
Since the ladder is in a state of equilibrium, \({F_{\rm{w}}}\) will be the identical magnitude as \({F_{{\rm{Gx}}}}\). Since \({F_{{\rm{Gx}}}}\) has the highest value, \({F_{\rm{w}}}\) will have the corresponding highest value, and \({F_{\rm{w}}}\) will have the maximum counterclockwise torque that it can exert.
As the person ascends the ladder, his lever arm becomes longer; so the torque due to his weight becomes higher.
Finally, if the torque produced by the person is larger than the maximum torque produced by\({F_{\rm{w}}}\), the ladder will begin to slip, and it will not be in the state of equilibrium.