Conversion from gallons to quarts
1 gallon = 4 quarts
Now,
Angela has

gallons =

= 10 quarts of blue paint
Ryou has 1/2 of what Angela has = 1/2*10 = 5 quarts of white paint.
Each wall requires

of paint.
After coloring;
Blue colored walls = (10)/(

) = 3 walls with 7/11 quarts of paint remaining.
White colored walls = (5)/(

) = 1 wall with 9/11 quarts of paint remaining
Profit will be achieved when the money earned is greater than the money spent so,
336 + (n*12) = n*28 any subsequent units sold would result in profit
336 = 28n - 12n
336 = 16n
=> n = 336/16 = 21
21 units must be sold to draw even any more would result in profit