im in middle school taking algebra 1 rn, but im pretty sure the equation is similar to 40x(40 pledges every mile) + 250(how much he already has from running) = y(the unknown variable).
so the equation would be 40x+250=y and you solve that to get the expression of how much he makes per mile