Given that

\begin{align*}
\frac{1}{x}+\frac{1}{y}&=3,\\
xy+x+y&=4,
\end{align*}

compute $x^2y+xy^2$.
This problem looks like a system of nonlinear equations, so I might try to use substitution or elimination to solve for x and y. However, before I do that, I notice that the expression I want to compute, $x^2y+xy^2$, can be rewritten as $xy(x+y)$. This looks very similar to the second equation, except for the factor of $xy$. So I wonder if I can use the first equation to eliminate $xy$ somehow. I recall that $\frac{1}{x}+\frac{1}{y}=\frac{x+y}{xy}$, so the first equation can be written as $\frac{x+y}{xy}=3$. This means that $xy=\frac{x+y}{3}$. Now I can substitute this into the second equation and get $\frac{x+y}{3}+x+y=4$. Multiplying everything by 3, I get $x+y+3x+3y=12$. Simplifying, I get $4x+4y=12$. Dividing by 4, I get $x+y=3$. Now I have an equation that relates $x$ and $y$, and I can use it to find $x^2y+xy^2$. Using the same substitution as before, I get $x^2y+xy^2=xy(x+y)=\frac{x+y}{3}(x+y)$. But I already know that $x+y=3$, so this becomes $\frac{3}{3}(3)=3$. Therefore, the answer is 3. 