Partitioning a Number on the basis of an equation
Non-negative means that they can be 0. So set everything to $0$ except $b$ and $d$ because they have the highest coefficient. 

$x=3*0+4b+2*0+4d$ and $0+b+0+d=5$ 

$x=4b+4d$ and $b+d=5$ 

$x=4(b+d)$ and $b+d=5$ 

$x = 4*5 = 20$