Christoffel Symbols and the change of transformation law.
Solution 1:
I'll go over the proof you included one line at at time: The first equality just uses the definition of the covariant derivative. The second equality uses the assumption that $\nabla_i Y^j$ is a tensor; this is the standard transformation law for any (1,1) tensor under coordinate transformations. The next equality is a similar step. Since $Y^l$ transforms as a tensor too, the step here is to re-express $Y^\prime$ in terms of $Y$. Then it's just expansion of the partial derivative $\frac{\partial}{\partial x^m}$.
Solution 2:
The second line is wrong. At first act with the transformation of the covariant derivative $Y^{j'}_{,p}$. Then you will get $$\frac{\partial x'^p}{\partial x^i}(Y^{j'})=\frac{\partial x'^p}{\partial x^i}(\frac{\partial x^{j'}}{\partial x^q} Y^p_q).$$ So, you will get a term that will cancel the last term in last line in your solution.