First, for constants a&b :
so this will explain from where did "5/9" come in step two.
To get , you will use long division.
You will devide 1 by 1 - (D/3) + (4D^2/9) , note that it should be arranged in increasing order. you will the constant term then the term contain D then term contain D^2 and so on.
Surely, this arrangement will make division result has infinite terms.
But you will step when the division result produces the term D^2 since your R(x) is x^2.
In general, if your R(x)=x^n then you will stop when you reach D^n.
I hope I've explained this in good way. Sorry for bad E, it is my 3rd language.
See the following picture to know how to do the long division :