Your payoffs for the investment are huge so you can guarantee a no loss investment if you put $95 In A and 5 in B and worst case scenario is that A fails and therefore B succeeds so you get your $100 back. If you were risk adverse you might just take the guaranteed profit by putting more than $5 in B. For example, if you split is 90-10 you can't possibly lose under your assumptions.

To maximize profits you would still put it all in A but your point is that you have no minimized your losses. You can guarantee to walk away with 1000 by splitting 50-50 into A and B because no matter what happens one investment pays off 20*50 and thus you've turned your 100 into 1000.

(I am assuming that you meant if A fails then B succeeds and if B fails then A succeeds)