There is no more connection between a livery stable and a boat than there is a Pastrycook’s and a boat.
The mariner is mocking the Inspector sarcastically, by suggesting businesses that have nothing to do with boats, because he thinks the Inspector’s question is ridiculous.