SnBr2 ==> Sn+2 + 2Br^-
The negative electrode will attract the positive ion. I assume you can take it from here.
what is the meaning of a stable octet
You should post questions that are different from the original in a separate post; otherwise, we may not come back to this question so any follow ups would be ignored.
Many elements tend to add or lose electrons so that their outside shell contains eight (8) electrons (in which their outside shell is like the noble gases of Ne, Ar, Kr, Xe, and Rn---The noble gas He has only two electrons in its outside shell because the first shell can hold only two electrons).