This is very awkwardly stated! In the first place, we don't have "two legos", we have two kinds of legos! The problem is to find how many of each kind we can use.
Then you are seeking non-negative integers, a and b, such that 4a+ 6b= 48. The first thing I would do is divide through by 2: 2a+ 3b= 24. Now "2" and "3" are prime so, by the Euclidean algortihm, we know there must exist integers (not necessarily positive), a and b, such that 2a+ 3b= 1. In fact, that's obvious- 3- 2= 1. Now multiply by 24: 3(24)- 2(24)= 2(-24)+ 3(24)= 24. That is, a= -24, b= 24 is a solution. But then, a= -24+ 3k, b= 24- 2k is also a solution for every integer, k: 2(-24+ 3k)+ 3(24- 2k)= -48+ 6k+ 72- 6k= 24.
We want non-negative integers so we need to choose k so that both a= -24+ 3k and b= 24- 2k are positive. 3 divides into 24 8 times so [tex]k\ge 8[/tex] will make a non-negative. 2 divides into 24 12 times so [tex]k\le 12[/tex] will make b non-negatifve.
The solutions are
- (k= 8) a= -24+ 3(8)= 0, b= 24- 2(8)= 8;
- (k= 9) a= -24+ 3(9)= 3, b= 24- 2(9)= 6;
- (k= 10) a= -24+ 3(10)= 6, b= 24- 2(10)= 4;
- (k= 11) a= -24+ 3(11)= 9. b= 24- 2(11)= 2; and
- (k= 12) a= -24+ 3(12)= 12, b= 24- 2(12)= 0.
s, not legos). Now, for each of your cases you found, count the number of orderings of the corresponding number of 4 inch lego and 6 inch lego using binomial coefficients. For instance, with three $4$ inch lego and six $6$ inch lego, you have nine spaces total and so $\binom{9}{3}$ ways to choose which of the spaces are used by the $4$ inch lego. – JMoravitz Mar 09 '20 at 12:21