We will label the pirates A, B, C, D and E, The solution is best explained by looking at what each pirate would propose, starting with the dogsbody, E.
D's and E's Proposals
E never actually gets to make a proposal, although he would award every single gold piece to himself if he had the chance. The problem is that D's proposal comes first, and D will always win this ballot as he holds the casting vote. Therefore, if pirates A, B and C were to be cast overboard, D would be able to propose the following and win:
D - 100
E - 0
C's Proposal
Being a reasonably intelligent pirate, C knows that if he gets to make a proposal through both A and B being thrown overboard, he would only have to offer E better than nothing to win the vote. Offering D better than nothing wouldn't work, as D knows that if C goes overboard, D would get the whole stash. C could therefore propose the following and win:
C - 99
D - 0
E - 1
B's Proposal
Also being reasonably intelligent, B has got out a small piece of paper and worked out all the above. To win the vote, all B has to do is to offer D more than he would get if C's proposal was adopted. Although D would be able to take the lot if A, B and C were to go overboard, D realises that in reality the game would never get that far, as C and E would gang together to make C's proposal win, as stated above. B can therefore offer D one more coin than he would get if B were thrown overboard, thus allowing B to win with the casting vote. The winning proposal would therefore be:
B - 99
C - 0
D - 1
E - 0
A's Proposal
At this point, A looks over at B scribbling on his small piece of paper and, with a smug grin, makes the following proposal:
A - 98
B - 0
C - 1
D - 0
E - 1
Knowing that, if given the chance, D will help B win B'