In a related question we've discussed the practicalities of hitchhiking on a car headed towards the ferry between France and UK, where @DJClayworth wrote:
A quick check on the most basic ferry of all, Dover-Calais with P&O, reveals that the cost of a car is the same no matter how many people are in in it. Simply check the price on this site and vary the number of people. I suspect that most other routes are the same.
However you do have to book the number of people, so your plan to hitch a ride is unlikely to work. And security considerations would probably prevent it happening anyway.
What happens if you book a car ferry for 2 people, but then show up for the DFDS or P&O ferry with 3 people? Is it possible to add an extra passenger as you drive onto the ship? If the answer is yes, what is the fee to do so?
Related question about adding extra passengers in advance on the web: Can I add passengers later for free to my booking for the DFDS Dover-Calais / Dunkirk ferry?