The question pertains to determining average rate of return per year over $n$ years when the final amount and principal invested each year is known and it is assumed that the principal is invested at the beginning of each year (as otherwise, the problem gets even more complicated I guess).
So, my principal would be : $P_1(invested~in~2012) + P_2(2011) + P_3 ...... = P $
My final amount = $A$
Using the formula for compound interest and assuming average rate of return over $n$ years is $x%$, we can propose the following formula:
$A = P_1(1+x\%)^1 + P_2(1+x\%)^2 + P_3(1+x\%)^3 +.......+ P_n(1+x\%)^n$
Assuming we know $A$, $P_1$, $P_2$, ....$P_n$ and $n$, how do we solve for x?