Well, the first step would be to multiply everything out. 1*2=2, g1*i=i, g2i*2=4i, and 2i*i=2i^2. This would bring the equation to 2+i+4i+2i^2=5(2+i)
Next, multiply the other side. 5*2=10, and 5*i=5i. The equation is now:
2+i+4i+2i^2=10+5i
Now, combine like terms, and arrange the sides from highest exponents to lowest exponents: i+4i=5i. You can arrange the equation to 2i^2+5i+2=5i+10.
Subtract 2 from both sides: 2i^2+5i=5i+8
Subtract 5i from both sides: 2i^2=8
Divide both sides by 2: i^2=4.
Finally, find the square root of 4 to get i. The square root of 4 is 2, so i=2.