Solution
= Solution
For
$$
X=xf(u)\partial_w+p(u)\partial_x,
$$
the only potentially nonzero components of $\mathcal L_Xg$ are
$$
(\mathcal L_Xg)_{ux}=p'(u)+f(u),
$$
and
$$
(\mathcal L_Xg)_{uu}=2x[f'(u)+a(u)p(u)].
$$
Thus the necessary and sufficient conditions are
$$
\boxed{f=-p',\qquad p''=a(u)p}.
$$
The second-order linear ODE has a two-dimensional solution space, giving a two-parameter family
$$
\boxed{X_p=-xp'(u)\partial_w+p(u)\partial_x}.
$$