Questions on Operational Amplifiers
Of course, both resistors act as a voltage divider. However, you most consider the fact that you have TWO voltage sources at the same time (Vin and Vout). Hence, you must apply the superposition rule for calculating the voltage at the midpoint between both resistors:

\$V_{n1}=V_{in}\dfrac{R_f}{R_i+R_f}\$ and \$V_{n2}=V_{out}\dfrac{R_i}{R_i+R_f}\$  with \$V_n=V_{n1}+V_{n2}\$.

Now - because the opamp has a (very) high open-loop gain Aol (approaching infinity) you can set the differential voltage Vd=Vp-Vn between both input terminals to zero. As a consequence, we have \$V_n=V_{n1}+V_{n2}=0\$ which finally yields \$\dfrac{V_{out}}{V_{in}}=-\dfrac{RF}{Ri}\$.