I dont think the Resistor and Capacitor section is correct.
This capacitor voltage is time dependent, you cannot say that I = V/R
First order circuits are pretty easy. There are 2 ways, one uses differential equations, the other is alot easier.
x(t) = x(infinite) + [ x(0) - x(infinite)] exp(-t/tau) <--- general form
A capacitor acts as an open circuit at t=infinite. So the voltage across it would be your source voltage. In this case, 9V. At t=0, we will assume that power was not applied, and at t=0 you just hit the switch so that the battery is connected in the charging circuit. Since a capacitors voltage cannot change instantaneously, at t=0, even though the battery is connected is still 0V. Apply these values into the equation above, and thats how you get your equation for voltage.
The discharging is the same thing except that v(infinite)=0 (since we are discharging) and v(0)=9V (a fully charged capacitor)
For a single order circuit like this...the charge time for C1 would be approx
v(t) = 9-9exp(-t/R1C1).
This accounts for all values of time.
Discharging would be
v(t)= 9exp(-t/R1C1)
And so because the voltage is time dependent, current also becomes time dependent. So yes, Ohms Law is used, but I = v(t) / R instead of I = V/R
Hope that makes sense.