To clarify (I thought I only had limited characters for a question or something)

The moving sofa problem requires constructing a shape of greatest possible area, such that it is able to move through a 1 wide hallway that bends at a 90 degree angle. (As you probably already know)

I would like to tackle the simpler problem: Try this problem with the restriction that our shape in question can only be a rectangle. In addition, the widths of both hallways (before, then after the bend) could be any length. For example, the width of the hallway before the turn could be 17, then 0.022 after the right angled turn. Let the widths of said hallways be a and b.

Ive been thinking of the idea that I could first represent the base of the rectangle in terms of slope and length, then find the area of the rectangle, then write a 2 argument function f(s,l) to represent this, then try to take the derivative, then... I'm not even sure if this would work as we would be dealing with 3 dimensional graphs, and as an 8th grader I do not want to go there. Hopefully it does not differ too much from simple 2D calc. Anyways, I am almost certain that this approach is far fetched and may not even work at all. If there a better way to approach this problem?