it appears to me that the current generated by 35 V and 2vx will
collide each other
It may be that you are assuming that a voltage source, whether independent or controlled, must source current, i.e., supply power to the circuit.
But, at least in ideal circuit theory, there's nothing "wrong" with a voltage source sinking current, i.e., receiving power from the circuit.
For a real world example, consider that, when a battery is being charged, the current is in the opposite direction than when the battery is being discharged.
I would like to know how the current flows across 5 Ω resistor.
If you're planning to be an EE, don't write or say things like "current across"; current is through, voltage is across.
Now, this circuit is very easy to solve. There are two unknowns so you need two independent equations.
For the 1st, write a KVL equation clockwise 'round the loop:
$$35V = v_x + 2v_x - v_o \rightarrow 3v_x = 35V + v_o$$
Now, you need one more independent equation. Can you find one?
Pretend, for a moment, that there is a resistor between the positive terminals of the 10v and 5v supplies. Then the voltage across the resistor is 5 volts. So the current through the resistor is $$i = \frac{5}{R} amps$$ Since the two supplies are connected by a short circuit, with zero resistance, what do you think the current across point a is?
Best Answer
You can do that because they are all in series. The same current flows through all the components. The terminal voltage is equal to the sum of all the component voltages. Those equalities apply whatever the order of the components.
You would not be able to re-order them if there were any shunt components changing the topology from all-series. As there are always stray capacitances to ground in the real world, it's whether these are significant that controls whether you can do this re-ordering. At mains frequencies, you can, at microwave frequencies, you can't. At intermediate frequencies, you'd need to do the sums to see how much error you're introducing.