The physics
A ladder at rest is in equilibrium. The forces add to zero. The torques about any point add to zero too.
ΣF = 0 Στ = 0
A smooth wall pushes only straight out. The floor pushes up, and its friction holds the foot. Take torques about the foot.
smooth wall: f = Nwall = (W/2) cot θ
Friction can grow only up to μN. At the least angle, friction is at that limit.
tan θ = 1/(2μ) both rough: tan θ = (1 − μ₁μ₂)/(2μ₁)
A rope holds up a hinged beam. Take torques about the hinge. The rope's arm is L sin θ.
A box on a tilting board slides when tan θ = μ. It tips when tan θ = width / height. The smaller angle comes first.
A rule rests on two fingers. The finger with less load slides. It stops when μkN on it equals μsN on the other.