This illustrates charging and discharging between two voltages with two time constants.
Since a capacitor looks like an open circuit "after a long time", the initial and final voltage
The "R" in the time constant is whatever Thevenin-equivalent resistance seen at the capacitor terminals. In the left-hand position, that's 9||1 kOhms. In the right-hand position, it's 2 kOhms.