Let X = the amount you have and Y = the amount she has.
If you give her 5 you would have the same amount so you get an equation like:
X-5 = y +5
Simplify :
X – y = 5+5
X -y = 10 (Call this equation 1).
Now if she gives you $8 you will have twice as much as her, so set up the second equation:
2(y-8) = x +8
Simplify:
2y -16 = x +8
2y -x = 8 +16
2y -x = 24 (Call this equation 2).
Now add equation 1 and 2 together:
X – y = 10 + 2y -x = 24
Simplify to get y = 34
Now replace y with 34 in equation 1 to solve for x:
X -34 = 10, x = 44
You have $44 and your sister has $34