Q: Show that any two intervals (a,b) and (c,d) have the same cardinality

So I guess I have to show there's a bijective function?

So f: (a,b) --> (c,d)

and f(a) = c

f(b) = d

In general f(x) = sx + t, just using different letters

So f(a) = sa + t = c

and f(b) = sb + t = d

Subtracting the two (sa + t) - (sb + t) = c - d

s(a-b) = c-d

Am I going along the right lines for the proof? How would I write out the final function and prove it's a bijection?