We have that
\[-\frac{L'}{L}(s,\mathrm{sym}^2 f) = \sum_{n = 1}^{\infty} \frac{\Lambda_{\mathrm{sym}^2 f}(n)}{n^s},\]
where $\Lambda_{\mathrm{sym}^2 f}(n)$ is equal to $\lambda_f(p^2) \log p$ if $n = p$ with $p \nmid N$, is essentially a bounded multiple of $\log p$ if $n = p^k$, and vanishes otherwise. (There are some minor issues at $p \mid N$ that are no big deal). In particular, this shows that the value at $1$ of this sum is basically equal to the desired sum up to a negligible error term.

Now use Theorem 5.17 of Iwaniec and Kowalski, which states that for $s = \sigma + it$ with $1/2 < \sigma \leq 5/4$ and assuming RH for $L(s,\mathrm{sym}^2 f)$ (as well as the Ramanujan conjecture, which is known via the work of Deligne),
\[-\frac{L'}{L}(s,\mathrm{sym}^2 f) = \frac{r}{s - 1} + O\left(\frac{1}{2\sigma - 1} (\log \mathfrak{q}(\mathrm{sym}^2 f, s))^{2 - 2\sigma} + \log \log \mathfrak{q}(\mathrm{sym}^2 f, s)\right),\]
where $r$ is the order of the pole of $L(s,\mathrm{sym}^2 f)$ at $s = 1$ and $\mathfrak{q}(\mathrm{sym}^2 f, s)$ is the analytic conductor. Note that $N$ is squarefree and $f$ has trivial nebentypus, so that $r = 0$. Taking $s = \sigma = 1$ and noting that $\log \mathfrak{q}(\mathrm{sym}^2 f, s) \ll \log kN$ yields the result.