When buying one may I choose which or I have to buy the top one of the pile. It’s not clear from the rules.
It is your choice. 1) The rules do not tell you to shuffle the deck at the beginning; they are just placed next to the board. 2) It says when you buy a card you "pick" which one. So it is not random.
And is possible to move the counter back from the dead end (e.g. blue 3) to the strait line (e.g. yellow 3)?
The rules are quite clear you only move it up or out on a branch. You cannot move backwards. The only way to get out of a dead end is to spend that money (resetting you to zero) and then move it up and out again. So in your example, you must spend 3 blue. It will reset to yellow 0 and then you will need to work your way back up to yellow 3.