Adams's writing often uses double meaning that relies on being literal. That is to say that he tends to use idiomatic prose to evoke its literal meaning, or to simplify complex subjects to their most basic abstraction to create humour or point out absurdity.
For example, when talking about Earth, he sums up existential crisis, monetary trade, and the value of wealth as follows:
"This planet has — or rather had — a problem, which was this: most of the people living on it were unhappy for pretty much all of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movement of small green pieces of paper, which was odd because on the whole it wasn't the small green pieces of paper that were unhappy." [Hitchhiker's Guide To the Galaxy (book), chapter 1]
In this, the humour is from the fact that, quite literally, it is absurd to use the movement of green pieces of paper to remedy unhappiness on a large scale.
It is worth noting that Douglas Adams was a British writer, and in Europe, Brown and Black rats are most common. The average Brown Rat's body is in the region of 8 inches long (As noted here) they also, from personal experience have a diameter of around 1.5 inches. If you take into account their tail, it is probably fair to estimate their volume as a cylinder 8 inches long, and 1.5 inches in diameter, or about 14 cubic inches.
And so, my understanding of the passage:
What he is suggesting is the literal distance a human being (both Ford Prefect and Zaphod Beeblebrox are establish in visual media and in the books as being near-identical to humans externally, barring the occasional extra appendage.) could spit a rat (or, as Ford Prefect states at one point "Comfortably spit out a rat") in a physical sense. An average baseball has a similar volume to a rat, and a tennis ball is smaller. If you take a tennis ball as an idealized rat for spitting (significantly smaller, and immobile, but still hairy) and tried to spit it out, having somehow managed to lodge it in your mouth, you would run up against two problems: Large solid objects are hard to spit out, and hairy object are hard to spit out. You couldn't spit it very far. If you added the movement of a rodent thoroughly displeased with being in your mouth to that, and it may in fact be impossible to spit out a rat, or if possible, not possible to spit if far, and by analogy, not possible, or if possible not to a great extent, to trust the mentioned individual.