Nick and David went shopping together with a total sum of $90. Nick spent twice as much as David. The amount David had left was $9 more than what he had spent. He had twice as much money left as Nick.
(a) How much money did David spend?
(b) How much money did Nick have at first.