So this is how I approached the problem and got stuck:A rectangle is bounded by the x-axis and the semicircle y = sqrt(25 - x^2)

Express the area of the rectangle as a function of x and find the domain of the function

But apparently this is how you're supposed to visualize it:

What I don't understand is how the side of the rectangle can be represented as the same thing as the formula for the semicircle. I thought they had to be different variables because they're two different things. How do you know you can use the same variables for both the side of the rectangle and the equation for the semicircle? And why is the other side of the rectangle 2x and not just x?

For the domain, it's apparently 0 ≤ x ≤ 5

But for the formula of the rectangle given in the correct solution, how can an area be 0? I would've thought you can't include 0 in the domain since then there wouldn't be any rectangle.