Your derivation is basically fine, and the last step is straightforward. Define $\mu = \frac{1}{2m}$, and then $$ Q_1' \propto \mu^{-3/2} \quad\Rightarrow\quad \ln Q_1' = -\frac{3}{2} \ln\mu +C $$ where $C$ is a constant, and so $$ \frac{\partial}{\partial\mu} \ln Q_1' = -\frac{3}{2} \frac{1}{\mu} = -3m $$ which leads to $\langle K_i\rangle = \frac{3}{2}k_BT$.
This is actually a version of one of the standard ways of deriving the equipartition of energy, or rather the "$\frac{1}{2}k_BT$ per quadratic degree of freedom" formula. If the energy can be written $E=\kappa x^2 + E_0$, where $x$ is one coordinate or one component of momentum, $\kappa$ is a constant, and $E_0$ is independent of $x$, then the classical partition function can always be factorized into an integral over $x$ and "the rest". When we write down the expression for $\langle x^2\rangle$, the integrals over the other coordinates will appear in the numerator and the denominator, and will cancel, as you have noted. We will just be left with a ratio of integrals over $x$. We can treat each of the three Cartesian components of momentum of each particle separately.
In that case we are just using the mathematical result $$ \langle x^2\rangle = \frac{\int_{-\infty}^{\infty} dx \, x^2 \exp(-\alpha x^2)}{\int_{-\infty}^{\infty} dx \,\exp(-\alpha x^2)} = \frac{1}{2\alpha} $$ where, here, $\alpha=\kappa/k_BT$. This leads to $\langle \kappa x^2\rangle = \frac{1}{2}k_BT$ as expected. The above ratio of integrals can be tackled by parameter differentiation (as mentioned, for instance in Mathematical Methods of Physics by J Mathews and RL Walker, 2nd edition, p61):
- Know that $\int_{-\infty}^{\infty} dx \,\exp(-\alpha x^2) = \sqrt{\pi/\alpha}$
- Differentiate both sides with respect to $\alpha$.
Your method is equivalent to this.