Given that P(X=1) = P(X=2), we can write:
\begin{aligned} P(X=1) &= e^{-\lambda}\frac{\lambda^1}{1!} \\ P(X=2) &= e^{-\lambda}\frac{\lambda^2}{2!} \end{aligned}
Dividing the two equations, we get:
\begin{aligned} \frac{P(X=2)}{P(X=1)} &= \frac{e^{-\lambda}\frac{\lambda^2}{2!}}{e^{-\lambda}\frac{\lambda^1}{1!}} \\ &= \frac{\lambda}{2} \end{aligned}
Since P(X=1) = P(X=2) , we have:
\begin{aligned} \frac{P(X=2)}{P(X=1)} &= 1 \\ \frac{\lambda}{2} &= 1 \end{aligned}
Therefore, \lambda = 2. Now, we need to find E(X^2):
\begin{aligned} E(X^2) &= \sum_{x=0}^\infty x^2 P(X=x) \\ &= \sum_{x=0}^\infty x^2 \frac{e^{-\lambda}\lambda^x}{x!} \\ &= \lambda^2 + \lambda \\ &= 2^2 + 2 \\ &= 6 \end{aligned}
So, E(X^2) = 6.