Q:

Simple question about superposition-theorem

Which one is correct? (first one is my solution, second one is how my teacher solved it in class as an example when he was teaching superposition theorem).
Red rectangles are where the difference is.

A:

In your calculation the problem is with \$V_2\$. You have a voltage divider, so it should be
$$V_2=3\cdot\frac{9}{6+9}=\frac{9}{5}$$
So the total voltage \$V\$ becomes
$$V=V_1+V_2=\frac{36+9}{5}=9$$
And \$i_x\$ is given by
$$i_x=\frac{V}{9}=1$$
as it should be.
EDIT:
To make it even a bit clearer: you can also directly compute the contributions of the two sources to the current \$i_x\$. Let \$i_{x,1}\$ be the contribution of the current source:
$$i_{x,1}=2\cdot\frac{6\cdot 9}{6+9}\cdot 9=\frac{12}{15}$$
The contribution of the voltage source is \$i_{x,2}\$:
$$i_{x,2}=\frac{3}{6+9}=\frac{3}{15}$$
So the total current is
$$i_x=i_{x,1}+i_{x,2}=\frac{12}{15}+\frac{3}{15}=\frac{15}{15}=1$$
which is of course the same result as obtained above.

