If $y(x)$ is the solution of the differential equation $y'(x)=y^2+x,$ then $y(x)$ is differentiable how many times?

Yep, your idea is right. A compact way to phrase it would be: Let $f(x)=y^2(x)+x$. Then by hypothesis $f$ is once differentiable (since $y$ is), and $y'=f$, so $y'$ is once differentiable. This implies $y$ is twice differentiable, and so $f$ is as well, but then $y$ is thrice differentiable, and so on.

This is called a bootstrap argument; improving $y$ improves your right hand side $f$, which in turn improves $y$ further, and so you iterate the procedure.