Are they different things? The equation gives us the -coordinate of a point on the semicircle corresponding to a particular -coordinate. But at one particular -coordinate (which we can simply call ), the height of the rectangle and the height of the semicircle are equal. Therefore, for this particular the height of the rectangle is and is given by

is the distance from the -axis to one side of the rectangle. To get the distance from the left side to the right side, we add the two distances in between: