Finding a and d given two terms | Arithmetic Progressions