How many blue rectangles there are? Blue and red rectangles are drawn on a blackboard. Exactly 7 of the rectangles are squares. There are 3 
red rectangles more than blue squares. There are 2 red squares more than blue rectangles. How many blue rectangles are there?
 A: Let $bs$,$bn$,$rs$, and $rn$ denote the number of blue squares, blue rectangles that are not squares, red squares and red rectangles that are not squares respectively, where each must be a non negative integer.
Then, the given conditions give the following equations:
$$rs+bs=7$$
$$bs+3=rs+rn$$
$$bs+bn+2=rs$$
Using the first and the third equation to eliminate $rs$, we get
$$bs+bn+2=7-bs$$
or $$2bs+bn=5$$
Now,
$$rs=7-bs$$
$$rs+rn=bs+3\ge rs$$
Thus
$$bs+3\ge 7-bs$$
$$bs\ge 2$$
For $bs$ and $bn$ to be non negative integers, in $2bs+bn=5$, we have $bs\le2$
Thus 
$$bs=2$$
$$bn=5-2bs=1$$
Also $rs=5$ and $rn=0$
The number of blue rectangles is $bs+bn=3$
A: Let $b,b',r,r'$ be


*

*$b$: the number of blue rectangles which are not square

*$b'$: the number of blue squares

*$r$: the number of red rectangles which are not square

*$r'$: the number of red squares.


From "Exactly 7 of the rectangles are squares.", we know $b'+r'=7$, from "There are 3 red rectangles more than blue squares.", we know $r+r'=3+b'$, and from "There are 2 red squares more than blue rectangles.", we know $b'=2+b+b'$. Therefore, we can set the system of linear equations
$$\left\{\begin{array}{ccccccccc}
0&+&b'&+&0&+&r'&=&7\\
0&-&b'&+&r&+&r'&=&3\\
b&+&b'&+&0&-&r'&=&-2
\end{array}\right.$$
Using Gaussian elimination, we get
\begin{cases}
b&=&-9&+&2r'\\
b'&=&7&-&r'\\
r&=&10&-&2r'
\end{cases}
Since $b,b',r,r'$ must be nonnegative integers, $r'$ is $5$. Therefore, $b+b'=1+2=3$.
A: Let there be $b$ blue and $r$ red rectangles, among them $b'$ and $r'$  squares. According to the text we have in turn
$$r'=2+b,\quad b'=7-r'=5-b,\quad r=b'+3=8-b\ .\tag{1}$$
The conditions $r'\leq r$ and $b'\leq b$ enforce $2b\leq6$ and $5\leq2b$, so that necessarily $b=3$. From $(1)$ we then obtain $r'=r=5$, $b'=2$.
