maximum area of a rectangle inscribed in a semi - circle with radius r.

Let $\theta$ be the angle that the slanted red (?) line on the right makes with the horizontal.

Then the height of the rectangle is $r\sin\theta$ and the base is $2r\cos\theta$, for an area of $r^2\sin\theta\cos\theta$.

This is $\frac{r^2}{2}\sin 2\theta$. But $\sin 2\theta$ has a maximum value of $1$, at $\theta=\frac{\pi}{4}$.


You have dropped an $x$ in calculating your derivative. By applying the product rule: $$\begin{align}A'(x) &= 2x\left(\frac{1}{2}(r^2-x^2)^{-1/2}(-2\color{red}{x})\right) + 2\sqrt{r^2-x^2}\\ &= \frac{-2x^{\color{red}{2}}}{\sqrt{r^2-x^2}} + 2\sqrt{r^2-x^2}\end{align}$$