Calculating the area of the rectangle and the square