Let us define the auxiliary process $\Lambda_t=e^{\kappa t}\lambda_t$. Note that:
$$ \Lambda_t = \kappa e^{\kappa t} \int_0^t(\rho_s-\lambda_s)ds+\delta e^{\kappa t}\int_0^tdN_t$$
Hence after a jump occurs at $t$:
$$ \Lambda_t=\Lambda_{t-}+\delta e^{\kappa t}$$
Therefore by Ito's lemma for jump-diffusion processes:
$$ \begin{align}
d\Lambda_t & = \frac{\partial \Lambda_t}{\partial t}dt+\frac{\partial \Lambda_t}{\partial \lambda_t}\kappa(\rho_t-\lambda_t)dt+(\Lambda_t-\Lambda_{t-})dN_t
\\[9pt]
& = \kappa e^{\kappa t}\rho_tdt+\delta e^{\kappa t}dN_t
\end{align}$$
Integrating:
$$ \Lambda_t=\Lambda_0+\kappa\int_0^te^{\kappa s}\rho_sds+\delta\int_0^te^{\kappa s}dN_s$$
Finally:
$$ \lambda_t=\lambda_0+\kappa\int_0^te^{\kappa (s-t)}\rho_sds+\delta\int_0^te^{\kappa (s-t)}dN_s$$
You notice that in the original SDE the following factor is the "nuisance":
$$d\lambda_t = \cdots + \left(-\kappa \lambda_t dt\right) + \cdots$$
which corresponds to the differential of an exponential with constant $\kappa$:
$$ dx_t = \kappa x_tdt \quad \Leftrightarrow \quad x_t = Ce^{\kappa t}$$
Hence you need to try to get rid of it by making a $+\kappa \lambda_t dt$ appear somehow, which can be achieved by differentiating an exponential with constant $\kappa$ through Ito's lemma applied to $\Lambda_t$ as defined above.