d + c = 19
100d + 15c = 1390
we can simplify the second equation
20d + 3c = 278
now d + c = 19
c = 19 - d
3c = 57 - 3d
now plug into second equation
20d + 57 - 3d = 278
17d = 278 - 57
17d = 221
d = 221 / 17
d = 13
now we can plug this into the first equation
13 + c = 19
c = 19 - 13
c = 6
13 dogs were sold and 6 cats were sold