If 50% of the thieves agree, then the plan would be carried out as the top rank thief suggests. So if there are only two thieves left, and the top ranking thief at that point of time suggest, the plan will definitely go through since just one agreeing thief is required (himself).
Use this first step to determine how the gold is distributed.
Edited:
looks like its abit too difficult... ok another hint.
If there are two thieves left, 50% of 2 is 1. As long as one out of these two thieves agree on the plan, the plan will be carried out. So the thief who suggests will DEFINITELY get his way no matter what. Will the lower rank thief want this outcome?
If not, what could he have done to prevent this outcome?