Setting up KCL equations for non-ideal op amps
\$v_d\$ is the voltage difference between the non-inverting and inverting terminals. By definition, it's also the voltage across \$R_i\$. Looking at the non-inverting terminal's node, you have three currents:


The usual current through \$R\$
The leakage current through \$R_i\$
The feedback current from the output


I find it's sometimes easier to use KCL if I use more variables than I need. Here's how I'd do the non-inverting terminal:

$$\frac {v_{out}} {R} + \frac {v_{out} - V} {R_i} + \frac {v_{out} - Av_d} {R_o} = 0$$

We know that \$v_d\$ is \$V - v_{out}\$, but it's easier to think through if I do that step separately:

$$v_d = V - v_{out}$$

$$\frac {v_{out}} {R} + \frac {v_{out} - V} {R_i} + \frac {v_{out} - A(V - v_{out})} {R_o} = 0$$

Now we can factor out the voltages and get an equation for \$v_{out}\$ vs. \$V\$:

$$v_{out}\big( \frac 1 R + \frac 1 {R_i} + \frac {1 + A} {R_o}\big) - V\big( \frac 1 {R_i} + \frac A {R_o}\big) = 0$$

$$\frac {v_{out}} {V} = \frac {\frac 1 {R_i} + \frac A {R_o}} {\frac 1 R + \frac 1 {R_i} + \frac {1 + A} {R_o}}$$

$$\frac {v_{out}} {V} = \frac {R_o + R_iA} {\frac {R_oR_i} {R} + R_i + R_o + R_iA}$$

If \$R_o\$ is zero (or very small), you're left with:

$$\frac {v_{out}} {V} \approx \frac {R_iA} {R_i(A+1)} \approx \frac A {A+1}$$

which means the output voltage is less than the input, but gets closer when \$A\$ is large. This shows the effect of a finite gain -- if the output and input voltages were exactly equal, there'd be no difference to amplify, so the output voltage has to be slightly less than the input.

If \$R_i\$ is infinite (or very large), some of the terms can be ignored, and you're left with:

$$\frac {v_{out}} {V} \approx \frac {A} {A + 1 + \frac {R_o} {R}}$$

which has the same finite gain effect, but also includes the effect of the \$R_o/R\$ voltage divider, which further reduces the output. The output still gets closer to ideal when the gain is large.

If neither \$R_i\$ nor \$R_o\$ can be ignored, but \$A\$ is very large, the terms with \$A\$ dominate, and you're left with:

$$\frac {v_{out}} {V} \approx \frac {R_iA} {R_iA} \approx 1$$

The moral of this story is that a high gain makes all of your problems disappear, at least at DC. That's why op amps have DC gains as high as a hundred thousand (100 dB) or more. The combination of a high gain and negative feedback is a powerful one, and is common throughout analog electronics and control systems.