He has 3 apples and 4 bananas, so he has 3 + 4 = <<3+4=7>>7 pieces of fruit.
He needs to buy 12 fruit - 7 fruit = <<12-7=5>>5 oranges.
#### 5