how can we solve a circuit with two opposing voltage sources using thevenin theorem
You must apply the Superposition Principle. 

It is about passivating one of the power sources and solving the unknown with the other power source. Next, the other source is passivated and again the unknown is solved with the source that was passivated in the first place.

In the case of voltage sources, passivation implies that the source is removed from the circuit and instead, an impedance equal to the internal impedance of the source is placed. If the circuit model is ideal, this corresponds to removing the voltage source and instead placing a short circuit.

If it is a question of current sources, we proceed in the same way, removing the source of the circuit and placing in its place an impedance equal to the internal impedance value of the source. If the model is ideal, the current source is removed and an open circuit is defined instead.

Take a look of my response to this question: Ohm&#39;s Law of a circuit which have both Voltage Source and Current Source