Firstly, the result for $ \bar y$ = $ 2 r /\pi $ might have been given earlier to the Exercise 5/5 not shown here,for a semi-circular arc, like a wire and not the full area.
It is calculated as $ \bar y $ =$ \dfrac{\int y ds }{ \int ds } = \dfrac{\int r \cdot r \sin \theta d \theta }{ \pi r } $ = $\dfrac {2 r}{\pi} $
Secondly, when a thin ring is considered, differential area of a semicircular ring is its arc length multiplied by thickness.
Area of circle = $ \pi r^2 $ is already an advanced result from integration for full circle.
In methods of differential calculus we have a clear meaning for differential quantities.When area dA and thin radial slice dr are differentials we are allowed to treat area of ring as that of a thin "curved rectangle". When a thin annular semi circle is considered, differentials only are multiplied.
$ dA = 2 \pi r dr $ comes at first for thin curved rectangle/ ring and then only comes $ A = \pi r^2 $ after performing integration for the full arc.
Now
$$ dA = \pi r dr $$
$$ \int y_c dA = \int_{R/2}^R \frac {2 r}{\pi} \cdot \pi r dr $$
etc., hope all else is clear.
The centroid of a planar region is (more-or-less) the same as the center of mass of a very thin sheet of material having the shape of the region. So, on that topic, your thinking is correct.
So, if the centroid is denoted by $(X_c,Y_c)$, it's immediately clear from a picture that $Y_c = 0$. What remains is to calculate $X_c$, which we can do by computing various integrals.
The easiest approach, I think, is to view the shape as a collection of very thin vertical strips each having width $\delta x$. For a constant value of $x$, the corresponding vertical strip extends from $g(x) = -\sqrt{2-x^2}$ up to $f(x) =\sqrt{2-x^2}$, so its total overall height is $f(x)-g(x)=2\sqrt{2-x^2}$, its area is $2\sqrt{2-x^2}\delta x$, and its contribution to the centroid calculation is $2x\sqrt{2-x^2}\delta x$.
We have to "add up" all these vertical strips, which means calculating integrals. We have to consider values of $x$ between $1$ and $\sqrt2$. So, the relevant integrals are:
$$
A = \int_1^{\sqrt2} \big[f(x)-g(x)\big] \, dx
= \int_1^{\sqrt2} 2\sqrt{2-x^2} \, dx
$$
$$
X_c = \frac{1}{A}\int_1^{\sqrt2} x\big[f(x)-g(x)\big] \, dx
= \frac{1}{A}\int_1^{\sqrt2} 2x\sqrt{2-x^2} \, dx
$$
I expect you can take it from here.
Best Answer
Cut it into small vertical rectangles each with height $y$ and length $dx$. Then the center of each rectangle is at $y/2$.
So the $y$ coordinate of the center is at $$Y=\frac{\int \frac{y}{2}ydx}{\int y dx}$$