A supply function for widgets is modeled by $P(q)=a q+b,$ where $q$ is the number of widgets supplied and $P(q)$ is the total price of $q$ widgets, in dollars. It is known that 200 widgets can be supplied for $\$ 40$ and 100 widgets can be supplied for $\$ 25 .$ Use a system of linear equations to find the constants $a$ and $b$ in the expression for the supply function.