These are a routine, but very valuable, pair of exercises in the theory of three-manifolds. So if you are trying to learn the material, don't read the following proof sketches until you desperately need some hints!
We assume that $M$ is compact and connected.
Suppose that $M$ is reducible. Then there is a sphere $S$ in $M$ that does not bound a ball on either "side". We deduce that $M$ is either $S^2 \times S^1$ (or perhaps the twisted version) or $M$ is a non-trivial connect sum. Since $\pi_1(S^2 \times S^1) \cong \mathbb{Z}$ the former case can be ignored. In the latter case $M$ is a connect sum $A \, \# \, B$. Thus $\pi_1(M) \cong \pi_1(A) \ast \pi_1(B)$. So the residual finiteness of $M$ reduces to that of $A$ and $B$.
Suppose that $M$ has boundary. Define $D(M)$ to be the double of $M$ across its boundary: that is, take two copies of $M$ and glue them using the "identity" on their boundaries. Thus $\pi_1(M)$ injects into $\pi_1(D(M))$. So the residual finiteness of $M$ reduces to that of $D(M)$.