Power supplies order

That's the point: what if i connect both vin and power jack?

No.
You can use the power jack and USB at the same time.
If you wanted to use Vin and the power jack at the same time you need to add a diode between Vin and your external power supply.
Cathode goes to the Vin pin. 1N4007.