Solving for volume with rectangular prisms