How can I find i1 and i2 in function of Vg in this circuit?
Once I have the system it shouldn't be a problem to solve it using for instance odeint in Python.


If your goal is to get a numerical solution for these currents, just use a simulator that's designed for solving circuits and let it work out the equations for you.

There are many simulators out there based on the original SPICE simulator, and many of them are available for free. Any of them can solve this very simple circuit.