There are four slices of cheese pizza. One of them is absent.
So, the amount of cheese pizza eaten is 14.
There are 8 slices of onion pizza. For the amount of pizza eaten to be the same as that of the cheese pizza, it must be an equivalent fraction of 14 with denominator 8.
So, the amount of onion pizza eaten =1×24×2=28
Hence, 2 slices of onion pizza must be eaten by Alex.