Example 2 - Geometrical approach
GeoGebra
Visualisation of the Problem
The applet shows the rectangle limited by the wall on the left. By moving the slider, the dimensions of the rectangle change.

This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com
Solution with TI-Nspire™
See here .
Other approaches