Check the final answer first, then review the worked steps.
0.5d + 2p = 800.5d = 80 - 2pd = 160 - 4pd = 160 - 4(5) = 140