The switch is closed at \$\small t=0\$, and the capacitor voltage for \$\small t \ge 0\$ is: \$\small v_c(t)=40-\frac{1}{C}\int i\: dt\$, where \$\small i\$ is the capacitor discharge current.
Now use KCL at the node pointed to by the blue arrow to form the required differential equation, and solve (using the integrating factor method, for example). The initial capacitor current is \$\small i(0)=\frac{10}{22} \:A\$