The ship met a storm and the captain drowned(The captain has a family.). Fortunately, the goods are safe. I found the captain's trade book and some of the money he hid. I didn't see any other documents. I've had a lot of experience as a navigator. Now I have the confidence that it is enough to be a captain. Crews also think positively of my becoming a captain.
The goods were purchased in half of the personal money of the captain and half with the money borrowed from investors. I'm expected to be able to pay off all debts owed to investors with the money me sold his ship's goods. I don't know what legal measures are needed to be the new captain of our ship.
If possible, I'd like to be a captain in a legitimate way. But if it's hard, I'd like to be a captain, even if it's dishonest. Tell me how I can be a captain.
(I understand that it is difficult to obtain data from this period. Any inaccurate information is fine.)
There is a lot to unpack here.
First we must clarify that in the late middle ages and early modern period, the person who ran commercial or merchant ships and who performed all the roles that would today fall under 'captain' - was actually the master. He had no officers above him, he hired and fired crew, was in charge of cargo, made all the decisions and calls, and was personally responsible and held accountable at the court of law. There was also occasionally onboard a officer called captain but whose role was usually limited to command of soldiers on board when they would be present which was rare on purely commercial voyages. When present, captains rank would take precedent in military situations, but otherwise they would be uninvolved in day to day running of the ship. But it doesn't take much imagination to find a way to spin that everything is a 'military' situation, does it?
With time the title of captain was adopted also by representatives of the investors and/or ship-owners of which master was the contractor, and additionally by noblemen who started taking interest in maritime affairs and for whom the commoner occupation of 'master' was demeaning and beneath their status. This was particularly the case for Portuguese in Exploration, where Portuguese crown was the ship owner and investor, who often sent soldiers on the ships, and who appointed noblemen - fidalgos - as captains, usually per mission basis. It is some considerable time later that the captain would become a professional officer with full command of the ship.
Secondly, we must touch on the subject of ownership of the ship and the cargo. It was possible for the master to be the owner of his own ship. But it was far more common for ships to have multiple part-owners of which master could be one or he could simply be an employee with no ownership stake. Similar situation would go for cargo of the ship. It was very rare that the ship carried cargo from only its master. It was far more common that a ship would be chartered or hired by various merchantmen. Often merchantmen would group together and form a impromptu company where they would share the costs. Shipowners were often invited in those partnerships where they would supply the ship as their part of the investment share. So, while it could (and rarely did) happen that masters would carry their own cargo on their own ships, it was more likely that both the ship and the cargo would have multiple owners of which master could be one.
While the master could be appointed to handle also the sale of the cargo, it was more usual that the merchantmen/investors would accompany their cargo on ships (by themselves or by sending their representatives) and as such could ask or command master to make changes to the plans. Master had to determine if those wishes complied with the mission and safety of the ship and crew, and here his judgment took precedent.
Lastly, we come finally to the case of death of the captain or the master. Now, as I said in Portuguese ships of 1500 captain was a military role reserved for nobles, and if a captain died he would be replaced by one of the other military men onboard by seniority or choice between them. The navigator belonged to the sailor - commoner - part of the crew, and he wasn't eligible to become a captain, but he could replace the master on his death which was probably what he wanted anyway. The procedure who would replace the master if he died was actually codified in the Middle ages, as we see in famous Catalan maritime law Consulate of the Sea, likes of which was probably used in Portugal at the time. In there, chapter CCXIX deals with death of the master on board (page 497) where it specifies that in such a case, either another part-owner of the ship, or closest kin of the master can be chosen by present merchants and officers (mate and ship's clerk, later probably pilot as well) to become the new master. If those don't have necessary maritime expertise, then a lieutenant master from the senior crew can be selected, but it is specifically pointed out that his appointment last only to the conclusion of the voyage upon which the control is returned to the owners where a new master would be appointed.
As for the getting the ship, all I can say is that while sometimes there was a custom of personal belongings of deceased person on board to be auctioned between the rest of the crew by the ship's clerk (and the proceedings to be sent to the heirs), other property, especially the likes of a whole ship, would be handled through typical process of will and testament where the ship and the rest of the estate of the deceased would be inherited by the lawful heir.
In your hypothetical situation, the best way to get a ship and become it's master would be to be next of kin of the master-owner of the vessel.