# Find a bijective function between two segments of R

In my homework in set theory i was asked to find a bijective function between (a,b) and (c,d) that are subsets of R. d>c and b>a.

I'm having problems thinking of a function that is surjective and injective. i thought of the function for example f(x) = x+d-b, where x is an element in (a,b) and it is indeed injective, but not surjective...

HINT:$\qquad\qquad\qquad\qquad\qquad\qquad\qquad$
Hint: $$(b-a)\cdot\dfrac{d-c}{b-a} = d-c.$$