Solving for volume of a pyramid