What did you do wrong? You wrote this:
dsolve(diff(diff(f))+3*diff(f)==12*x-5), f(0) == 1, Df(0)== 0
And how is that different from what I wrote below? You did not put the initial conditions INSIDE the call to dsolve. You had them on the same line as the call to dsolve, but that does not count! So close, really...
This works nicely:
ysol = dsolve(DDy + 3*Dy == 12*x - 5, y(0) == 1,Dy(0) == 0)
2*x^2 - exp(-3*x) - 3*x + 2
Do you see the difference? The initial conditions need to be passed into dsolve for it to work properly.