Let x = number of pages holding 2 cards, y = number of pages holding 3 cards.
So his total number of card would be 2x + 3y, which is given as 18. So we get this equation.
2x + 3y = 18
Subtract 3y from both sides:
2x = 18 – 3y
Divide both sides by 2:
x = (18 – 3y)/2
x must be an integer. So 18–3y must be a multiple of 2. Since 18 is a multiple of 2, 3y is also a multiple of 2. Then y must be a multiple of 2 too.
Let's start with y = 0. When y = 0, x = (18 – 3(0))/2 = 9. When y = 2, x = (18 – 3(2))/2 = 6. When y = 4, x = (18 – 3(4))/2 = 3. When y = 6, x = (18 – 3(6))/2 = 0.