if it's 40, then he bought only $50 bonds, hence $50*40=$2000
if it's 30, then he bought 10 $100 bonds, and 20 $50 bonds,
hence 10*$100 +20*$50=$1000+$1000=$2000
if it's 50, it's not possible, cos no matter the ratio, he will buy more than $2000 worth of bonds
i don't know how to go about 27 and 29