Solution check for a combinatorics problem I had the following problem in an algebra test:

In the following table of 3 rows x 5 columns we want to paint 9 squares with red and the rest with blue, in a manner such that no row is left completely red (meaning in each row there is at least one blue square). How many ways are there to do it?


I thought to first choose 1 square of each row to paint blue for each row: $\binom{5}{1} \cdot 3$ and then choosing the remainder to paint either blue or red, red would be: $\binom{12}{9}$.
So my final answer would be$\binom{5}{1} \cdot 3 \cdot \binom{12}{9}$.
Is this correct? Am I missing cases or counting more than I should? Would you approach it with a different strategy?
Thanks!

There are actually several problems with your analysis. First, there are $5^3$ ways to pick one square from each row, not $5\cdot 3$: you’re making a $5$-way choice $3$ times. That error clearly results in considerable undercounting: fixing it changes your $3300$ to $27,500$. Unfortunately, another error means that this figure drastically overcounts. 
Consider the arrangement in which you paint the lefthand $3\times 3$ block red and the rest blue: this coloring gets counted $2^3=8$ times, one for each of the $8$ ways of picking one blue square from each row to be the three blue squares that you chose at the start.
It’s a little easier to count the bad colorings, those that make at least one row all red. Since we’ll have only $9$ red squares, we can make at most one row all red. There are $3$ ways to choose that row, and there are then $\binom{10}4$ ways to choose which $4$ squares in the other two rows will be red, so there are altogether $3\binom{10}4$ bad colorings. There are $\binom{15}9$ colorings altogether, so the desired answer is
$$\binom{15}9-3\binom{10}4=5005-630=4375\;.$$
