Replacing two ideal with two linear voltage sources
For general notes on the thevenin-theorem, you may consult Christianidis Vasilleios answer.
In the case of my exercise, and the solution provided by my professor, the procedure was related, but a little different, and I want to explain it now:
Thevenin's theorem states that we can replace any bipolar circuit with only linear elements by an equivalent circuit, containing only one voltage source and one inner resistance.
Let's name the node between the two voltage-sources C, and cut out the upper voltage-source, together with resistors \$R_1\$ and \$R_3\$. This is the cut-out circuit:



simulate this circuit &ndash; Schematic created using CircuitLab
This is clearly a bipole, and only contains linear elements, so we may form an equivalent circuit, containing only one voltage source and one resistor.
For the resistor, let's name it \$R_1^*\$, short the voltage source. This will lead to:
$$ R_1^* = R_1||R_3 = \frac{R_1R_3}{R_1+R_3} $$
For the voltage, note that whatever load \$R_L\$ we may put between A and C, the voltage-drop across it will equal the voltage-drop across \$R_3\$. (Since \$R_L\$ is in parallel to \$R_3\$.
$$ R_L = R_3 $$
There will also be a voltage-drop across \$R_1\$. Here the voltage-divider rule comes into play:
$$ \frac{U_3}{U} = \frac{R_3}{R} $$
or:
$$ \frac{U_L}{U} = \frac{R_3}{R_1+R_3} $$
This leads to:
$$ U_L = U \frac{R_3}{R_1+R_3} $$
which will be the equivalent voltage for our cut-out circuit.
Plugging this new circuit back into the original one will give:



simulate this circuit
The same may be done with the lower voltage-source together with the respective resistors \$R_2\$, \$R_4\$ leading to the result of the question.