In order to get the same number of buns and bread rolls, the minimum quantity of buns and bread rolls bought by Alex will be LCM of 10 and 8.
Multiple of 10 = 10, 20, 30, 40, 50, and so on.
Multiple of 8 = 8, 16, 24, 32, 40, 48, and so on.
LCM of 10 and 8 = 40.
The smallest number of boxes Alex should buy for buns alone will be 40 divided by no. of buns in each box, i.e. 4.
40÷4 = 10
So, he should buy 4 boxes of buns for a party.