First we will find the area of the region bounded by the curves:
$y = x^2$ ... (i)
and $y = x $ ... (ii)
To determine the shaded area between these two curves, we need to sketch these curves on a graph. 
Now, we will find the area of the shaded region from O to A.
Area of Shaded Region Between Two Curves :
$A = \displaystyle \int _a^b [f(x)-g(x)] \;dx$
Where, $f(x)$ is the top curve
$g(x)$ is the bottom curve
$a$ (Lower limit) = $x$ coordinate of extreme left intersection point of the area to be found.
$b$ (Upper limit) = $x$ coordinate of extreme right intersection point of the area to be found.
So, $f(x) = y = x$
$g (x) = y = x^2$
We need to find the limits, $a$ and $b$.
How to find the limits ?
Since limits, $a$ and $b$, are the $x$ coordinates of the intersection points, So, we will find the intersection points of the given curves.
Put the value of $y$ from equation (ii) into equation (i)
$x=x^2$
$x^2-x=0$
$x(x-1)=0$
$ x=0, x = 1 $
Put these values in equation (ii)
$y = 0, \; y = 1$
Thus, the points of intersection are $O(0,0)$ and $A (1,1)$
$\therefore \;a=0, \;b=1$
Area between Curves :
The are will be, $A = \displaystyle\int _a^b [f(x)-g(x)] dx$
$A=\displaystyle \int_0^1\; (x-x^2)\;dx$
$A=\displaystyle \int_0^1\; x\;dx-\displaystyle \int_0^1\; x^2\;dx$
$ =\left ( \dfrac {x^2}{2}\right)_0^1-\left ( \dfrac {x^3}{3}\right)_0^1 $
On putting limits,
$ =\left ( \dfrac {1}{2}-0\right)-\left ( \dfrac {1}{3}-0\right) $
$=\dfrac {1}{2}-\dfrac {1}{3}$
$A=\dfrac {1}{6}$
(II) Now, we will find the shaded area bounded by the curves:
$y = x ^2 + 1$ ... (iii)
$y = 2$ ... (iv)
Curves on Graph : 
We will find the area of the shaded region from $A$ to $B$
Here, $ f(x) = y = 2$
$g(x) = y = x^2+1 $
Finding the limits using intersection points :
Put the value of $y$ in equation (iii)
$2 = x^2+1 $
$ x^2 = 1 $
$ x = -1, x = 1$
Put these values in equation (iii)
$y = 2, y = 2 $
Thus, the points of intersection are $A (-1, 2)$ and $B (1, 2)$
$ \therefore \;a=-1, \;b=1$
Area between Curves :
The area will be,
$A = \displaystyle\int _a^b [f(x)-g(x)]dx $
$A=\displaystyle \int_{-1}^{1}\; [2-(x^2+1)]\;dx$
$A=\displaystyle \int_{-1}^{1}\; 1\;dx-\displaystyle \int_{-1}^{1}\; x^2\;dx$
$=\left ( x \right)_{-1}^{1}-\left ( \dfrac {x^3}{3}\right)_{-1}^{1}$
On putting limits, we get,
$= (1+1)- \left( \dfrac {1}{3}+\dfrac {1}{3}\right)$
$=2-\dfrac {2}{3}$
$A=\dfrac {4}{3}$