Finding the area of a right triangle or its corresponding rectangle