Trouble understanding this voltage divider for a non-inverting Op Amp
Both solutions are equivalent. They just look different because one current is in terms of vin and the other in terms of vout. 

If you substitute (from the gain) \$V_{in} = V_{out}\frac{R1}{R1+R2}\$ you get the equation in the book.