Sam and David had some money. Sam spent 60% of the money and gave 30% of the remainder to David.

As a result, Sam and David each had $420. How much money did David have at first?

0.70 * 0.40s = 420

s = 1500
0.30 * 0.40 * 1500 + d = 420
d = 240