David and Alan finally leave the Highlands and return to the Lowlands, reaching Queensferry by crossing the Forth. David meets his family lawyer, Mr Rankeillor, who believes David's story and says Ebenezer must be dealt with. He reveals Ebenezer and David's father fell out over a woman, David's mother.
They made an agreement - David's father married his mother while Ebenezer took the estate and fortune. This broke with convention as Ebenezer was the younger brother. Rankeillor says this is not legally binding and David is the true heir of the estate. But David does not want the House of Shaws, just an income from its earnings.
To set matters right, David plays a trick on Ebenezer. Rankeillor, David and Alan go to the House of Shaws. Alan walks up to the door alone and says he has found David alive after the shipwreck. He asks for money in return for the boy, but Ebenezer refuses to pay anything. Alan then says they will kill the boy unless Ebenezer pays to have him kept alive.
Ebenezer admits the plan had been for Hoseason to sell David into slavery in the Carolinas. At that point, David and Rankeillor reveal themselves, having caught Ebenezer confessing. Ebenezer and Rankeillor then work out an agreement for David to get two-thirds of the annual income of the House of Shaws.
David receives a note from Rankeillor that will allow him to collect his money. David then speaks to Alan and arranges to send him money so Alan can get passage to France. The two men part and David sets off into town to claim his fortune.