How is the optimal Bet calculated?

Example.JPG