Question with op amp circuit
You have things switched up. It's exactly opposite what you say. When Rf = inf there's no feedback path, and then V1=5/6Vs and Is = V1/5k because there's no other path for the current to go.

When Rf=40k now there's a feedback path, and if you perform the math by equating Vo to Vi by tracing the currents from the right to the left side through the op-amps you'll end up with Vo=9V1. And if you determine the current through the 5k and determine the current through Rf, you'll find that they're equal and opposite which means that all of the current flowing into or out of the 5kohm resistor is actually going through the 40k resistor as well leaving no current left to go through Rs. Rf chosen to be 40k is what allows for it in this circuit.

Your two cases are actually these:
 1. Rf=inf. V1=5/6*Vs. (Vs-V1)/1k = Is
 2. Rf=40k. V1=Vs. Is=0

If you're still confused, let me know and I'll add in equations and numbers.