edit1: i have forgotten to specify that i am interested only in the area enclosed in the first quadrant(ie both x and y are equal or bigger than zero)
$$ \int^{1}_{0}\int^{2-x}_{x^2}1 dydx= \frac{7}{6} $$ but when i try to change the order of integration to $$ \int^{2}_{0}\int^{2-y}_{sqrt(y)}1 dxdy $$ i dont get the same solution and i have no idea where i am making the mistake since i think i swapped the limits corectly and square root function is well defined on the part im integrating and to me looks like im enclosing the same space. Thank you in advance
If you want to integrate with respect to $x$ first, note that for a particular value of $y,x$ ranges from $0\to2-y$ when $1<y<2$ and $0\to\sqrt y$ when $0<y<1$, giving us the required integral:$$\left[\int_0^1\int_0^{\sqrt y}+\int_1^2\int_0^{2-y}\right]1~dx~dy$$
You may confirm that this gives $7/6$.