Solve for r a=p+prt