A 5 m ladder leans against a wall with a 1 m x 1 m crate between the ladder and the wall. a is the distance from the bottom of the wall to the base of the ladder where it is touching the ground. b is the distance from the bottom of the wall to the point the ladder is touching the wall.

From the previous parts of the question, I've got the following answers:

a + b = ab

(Pythagoras')

From all the formulas I've found out, how do I find the maximum value of b?

The answer's 4.84.

I've tried using differentiating and then equating it to 0 like similar questions but it doesn't seem to work...