Answer
$\$11,000$ in stocks
$\$29,000$ in bonds
Work Step by Step
We know that Tony invested $\$40,000 $ in both stocks and bonds. Let $ x$ be the amount invested in stock at the interest rate of $11\%= 0.11$ and $ y$ be the amount invested in bonds at the interest rate of $9\%= 0.09$.Then, the sum of the money invested must satisfy the following equation: $$ x+y = 40000.$$ Similarly, the sum of the interest earned each year must satisfy the following equation: $$ 0.11x+0.09y = 4180.$$ We can now solve the system of equations to figure out the amount of money that must be invested in both stocks and bonds. $$\begin{cases}
x+y& = 40000 \\
0.11x+0.09y &= 4180.
\end{cases}$$ Solve the above equations for $x$ and $y$. Multiply the first equation by $-0.11$ and add the result to the second to eliminate $x$. $$\begin{cases}
-0.11\cdot (x+y)& = -0.11\cdot 40000 \\
-0.11x-0.09y &= -4400.
\end{cases}$$ Now add this to the second equation and solve for $y$. $$\begin{aligned}
-0.11x-0.11b &= -4400\\
0.11x+0.09y &= 4180.
\end{aligned}$$ Rearrange: $$\begin{aligned}
(0.11x-0.11x)+(0.09x-0.11y)&=4180-4400\\
-0.02y&= -220\\
b & = \frac{-220}{-0.02}\\
&= \$11,000.
\end{aligned}$$ Finally, use the first equation to find the value of $x$. $$x= 40000-y = 40000-11000= \$29,000.$$ He needs to invest $\$11,000$ in stocks and $\$29,000$ in bonds, respectively.