Have I done this manipulation correctly?

I started with this

http://i46.tinypic.com/2mmya6b.jpg

and rewrote it as this, factoring out sum(ei)

http://i46.tinypic.com/14476vo.jpg

Is this correct? What I am unsure about is the bottom of the fraction, should it be sum(xj-xbar) or sum(xi-xbar)?

It's a question in which the final answer has (xj-xbar) on the bottom of that fraction (once you use common denominator) I am trying to establish if it is a typo.

Re: Have I done this manipulation correctly?

No, that is not correct. The terms depend upon i and are also in the sums.

Re: Have I done this manipulation correctly?

Oh, so I cant even do that manipulation... :(

The final answer that I had to derive was:

http://i49.tinypic.com/n6kp5.jpg