Calculation of the input resistance of an op amp circuit
When an ideal op amp is connected with negative feedback, it obeys two rules:


The voltages at the two input pins are equal.
No current flows into either pin.


In your first circuit, \$V_S\$ is only connected to the non-inverting input. By rule #2, no current flows into that input. This lets us calculate the equivalent input resistance:

$$I_S = 0\ \mathrm A$$
$$R_{in} = \frac{V_S}{I_S} = \frac{V_S}{0\ \mathrm A} = \infty \  \Omega$$

Your second circuit is drawn incorrectly. You've connected R2 to one of the op amp's power pins, but it should be connected to the output. In this circuit, current can flow from \$V_S\$ to the output, although none flows into the inverting input. Here we need rule #1, which tells us that the voltage at the inverting input is equal to the voltage at the non-inverting input -- zero volts (ground). So the circuit acts like the right side of \$R_1\$ is grounded, which makes \$R_1\$ the input resistance. We can work out the math, too:

$$I_S = \frac{V_S - 0\ \mathrm V}{R_1} = \frac{V_S}{R_1}$$

$$R_{in} = \frac{V_S}{I_S} = \frac{V_S}{\frac{V_S}{R_1}} = R_1$$