Remember h=0 so it should not appear. Since we are second order we should not have h^2.
Here is another equivalent approach
$$\text{if}
\\
\mathrm{f}(x+2h)=\mathrm{f}(x)+2h\, \dfrac{df}{dx}(x)+\mathrm{O}(x^2)
\\
\mathrm{f}(x+h)=\mathrm{f}(x)+h\, \dfrac{df}{dx}(x)+\mathrm{O}(x^2)
\\
\mathrm{f}(x+2h)=a\, \mathrm{f}(x+h)+b\, \mathrm{f}(x)
\\
\text{then}
\\
\mathrm{f}(x)+2h\, \dfrac{df}{dx}(x)+\mathrm{O}(x^2)=a\left[\mathrm{f}(x)+h\, \dfrac{df}{dx}(x)\right]+b\, \mathrm{f}(x)+\mathrm{O}(x^2)
\\
\mathrm{f}(x)+2h\, \dfrac{df}{dx}(x)=a\left[\mathrm{f}(x)+h\, \dfrac{df}{dx}(x)\right]+b\, \mathrm{f}(x)$$
What do a and b need to be?