This basically comes down to maximizing

subject to

and enforcing

. We have the Lagrangian

with partial derivatives (set equal to 0 to find critical points)

Solving the first equation for

gives

. Substituting this into the next two equations, we have


Now



So the vertex of the cuboid in the given plane that maximizes the cuboids volume is

, giving a volume of

.