Hello!
Let's put this into a system of equations and have a represent the apples and o represent the oranges.
o=2a+2
0.5o-0.5a=4
Since we can already so what o equals (2a+2) we will substitute it into the second equation and solve for a.
0.5(2a+2)-0.5a=4
1a+1-0.5a=4
1.5a+1=4
1.5a=3
a=2
Now that we know the value of a will put a into the first equation to find o.
o=2(2)+2
o=4+2
o=6
There were 6 oranges and 2 apples.
I hope this helps!