Hello,
I believe that you may have previous definitions of f,g, or y.
When I try your code from a fresh kernel, I get the DSolve back, indicating that Mathematica failed to find a closed form solution.
Try:
Clear[f,g,y];
DSolve[{y''[x] + (2/x) y'[x] + g[y[x], 2, 2, 3]==0, y[0]==2, y'[0]==0}, y, {x,0, 1}]
I believe you may have to resort to NSolve:
Clear[y, f, g];
f[x_] := 3/4 Sqrt[Pi] - 2/3 Exp[x]*Gamma[5/2, x];
g[x_, p_?NumericQ, l_?NumericQ, m_?NumericQ] := (f[x]/f[p]) +
l*(f[m*x]/f[m*p]);
nsol = y /.
NDSolve[{y''[x] + (2/x) y'[x] + g[y[x], 2, 2, 3] == 0, y[1] == 2,
y'[1] == 0}, y, {x, 1, 2}][[1]]
Plot[nsol[t], {t, 1, 2}]
I changed the domain of x because there is a singularity at x=0.
You could generalize nsol to take arguments for numerical values of p,l,and m.
Note the use of the ?NumericQ pattern restriction is because NSolve only plays nice when it calls functions that are defined for numerical values.