If you are the driver in a submarine, with AI in the gunner's seat, you can select 'move to gunner'...
However, once in the gunner's seat, there is no 'move to driver' - so you are stuck there unless you and the AI get out and swap positions.
EDIT:
You are then faced with this problem
http://feedback.arma3.com/view.php?id=25010
- the AI will drive off without you, and won't disembark.