s=number of sally stams
m=marthas stamps
m=s
s sold 18
s-18
m is 4 times as (s-18)
m=4(s-18)
so
solve
m=s
subsitute
s=4(s-18)
distribute using distributive property which is a(b+c)=ab+ac
4(s-18)=4s-72
s=4s-72
subtract s from both sides
0=3s-72
add 72 to both sides
72=3s
divide both sides by 3
24=s
m=s
m=24
they each had
24 to begin with