Fanny mad a profit of $1020 on selling sports shoes and slippers. The profits from selling a pair of sports and slippers are $40 and $25 respectively. Suppose that 30 pairs of shoes are sold of which x pairs are sports shoes.
(a) Express the total profit from selling the slippers.
(b) Find the value of x.