A carpenter purchased 60 ft of redwood and 90 ft of pine for a total cost of $315. A second purchase, at the same prices, included 100 ft of redwood and 60 ft of pine for a total cost of $408. Find the cost per foot of redwood and of pine.