from the link TC posted:
That's how you derive E(X) from the probability density function you're given. You don't need that, because you know E(X) already . What you need is E(X²), so integrate x²f(x) instead of xf(x).
Well, the Xi are observations, produced by the pdf you're given, right? If you take your â and divide by n, the expected value of that expression is 2a/3. Rearranging gives you an estimator for the parameter a in terms of your observations (namely the sample mean: your â divided by n)