A fruit vendor sells apples and oranges on a market day. Each apple costs $3, and each orange costs $2. If the vendor sells a total of 40 pieces of fruit for a total of $98, how many oranges did he sell?
Let the number of apples be represented by $a$ and the number of oranges by $o$. We can set up the following equations:
1) $a + o = 40$
2) $3a + 2o = 98$