David purchased some cookies at the cost of
5 for $4 (5/4=1.25) and
sold them at 4 for $5(4/5=0.80).
To find cost per cookie subtract 1.25-0.80=0.45
David made a profit of $180 in total ( divide profit per cookie cost: 180/0.45= 400)
How many cookies did David purchase to make that much money?
He needed to make 400 cookie to make the profit of $180.