Mr. Riach is not an uneducated man but he is relegated to the level of a ship like the Covenant because he is addicted to drink (though not to the degree that Mr. Shaun is), so he has a depth of understanding and moral philosophy that other hardened sailors didn't have. When he saw the condition David was in, he comprehended immediately the consequences to David and the legal consequences to Captain Hoseason. On this knowledge, he approached the Captain with all serious intend and negotiated for David's removal from the storage hold to the forecastle.
Mr. Riach first approached the Captain as a man of reason and compassion by pointing out that David had "a high fever, no appetite, no light, no meat." When that failed to stir the Captain's activity on David's behalf--since the Captain had been paid a handsome sum by Ebenezer to be rid of the lad one way or the other--Mr. Riach pointed out that he had not been bribed, as had the Captain.
This hint didn't sway Captain Hoseason either, so then Mr. Riach went straight to the real issue at hand. Murder on the high seas was still a murder that violated the laws of the British Crown and was punishable by immediate hanging, as true for Fagan in Oliver Twist. Once Hoseason understood that Mr. Riach was in dead earnest, so to speak, about not covering up the bribe if David were to die, Hoseason changed his attitude, saying, "If ye say the lad will die--," thus yielding to Mr. Riach's threat of the long arm of the law. As a result of Mr. Riach's threatening intervention, the Captain gave him freedom to have David moved to the forecastle, saying, "Flit him where ye please!"