Answer:
Mr. Smith's class sold 32 items for $112 and Mr. Davis's class sold 40 items for $110
Mr. Smith's class earned $2 more.
Explanation:
Let
x = number of items Mr. Smith's class sold
y = number of items Mr. Davis's class sold
1. Together, the classes sold 72 items, then

2. .Mr. Smith's class sold wrapping paper for $3.50 each, so x items cost $3.50x.
Mr. Davis ' class sold magazines for $2.75 each, so y items cost $2.75y.
Together, the classes earned $222, then

3. You get the system of two equations:

From the first equation,

substitute it into the second equation:

Mr. Smith's class sold 32 items for
and Mr. Davis's class sold 40 items for

Mr. Smith's class earned
more.