N - Nicholes money
M - Marys money
(1) N + M = 4800 ⇒ N = 4800 - M
(2) N - 800 = M - 2/5M ⇒ N - 800 = 3/5M
subtitute (1) to (2)
4800 - M - 800 = 3/5M
4000 - M = 3/5M
-M - 3/5M = -4000
-8/5M = -4000 |multiply both sides by (-5/8)
M = 2500
subtitute the value of M to (1)
N = 4800 - 2500
N = 2300
Answer: Mary had at first $2500. (Nichole: $2300).