Find so that

Solution from lecturer:

Therefore

I'm having real trouble understanding this solution...

I'm guessing this bit comes from multiplying out and then removing any repeated elements? But why is this then equal to ?

Please could someone please explain this simply?

Thanks in advance!