Given the initial conditions $y(0)=2$ and $y'(0)=a$ for some $a\in\mathbb{R}$, there exists $\delta>0$, such that the equation has a unique smooth solution $y=y_a(x)$ on $(-\delta,\delta)$, which satisfies the above initial conditions.
Denote $y_a''(0)=b$ and $y_a'''(0)=c$ and let us consider the local behavior of $\sin$, $\cos$ and $y_a$ near $0$: $\sin x=x+o(x)$, $\cos x=1+o(x)$, $y_a(x)=2+ax+o(x)$, $y_a'(x)=a+bx+o(x)$ and $y_a''(x)=b+cx+o(x)$. Substituting these expansions into the equation, we have: $b+cx+2(a+bx)+2x-x=o(x).$ Comparing the coefficients of constant term and $x$ term, we have: $2a+b=0$ and $2b+c=-1$. If $a>0$, then $b<0$ and hence $y_a$ is concave on some neighborhood of $0$. If $a<0$, then $b>0$ and hence $y_a$ is convex on some neighborhood of $0$. If $a=0$, then $b=0$, and $c=-1$, so $y_a$ is concave on $(0,\epsilon)$ and convex on $(-\epsilon,0)$ for some $\epsilon>0$. Finally, from the analysis above we know that for any $a\in\mathbb{R}$, $x=0$ is not a local extreme value point of $y_a$.