Since x= a1t+ b1, t= (x- b1)/a1 so y= a2t+ b2= a2(x- b1)/a1+ b2. That is your f(x)= (a2/a1)x- (a2b1/a1) +b1. f'= (a2/a1). Your integration is just
That is, of course, a very easy integral because the integrand is a constant. In fact, you don't need to integrate at all: x goes from a1t0+ b1 to a1t1+ b1, a difference of a1(t1- t0). y goes from a2t0+ b2 to a2t1+ b2, a difference of a2(t1- t0). Use the Pythagorean theorem to find the distance: .