Let h(x)=x2+2mx+(m2−1), where m is a real parameter. The function is considered on the interval [m,m+2].
(i) Express the average value of h(x) on [m,m+2] in terms of m.
(ii) Determine all real values of m for which the average value obtained in part (i) equals 3.