Proving a result related to Farey Sequence This is a problem from Tom M Apostol modular functions and Dirichlet series in number theory of Chapter -5 . 
I am adding image of the problem
 
I proved that fractions $\theta $  =$\frac{\lambda a + \mu c } { \lambda b + \mu d } $ always lie between a/ b and c/d. 
But how to prove that every fraction lying between a/b and c/d is of this form and $\lambda$ and $\mu $ are relatively prime. 
Can someone please help with this problem. 

Suppose $c/d<a'/b'<a/b$ with $d,b',$ and $b$ all positive, and with $ad-bc=1$ and $\gcd(a',b')=1.$ Consider the simultaneous equations $$La+Mc=a',$$ $$Lb+Md=b' .$$  The unique solution for $(L,M)$ is $$L=\frac {a'd-b'c}{ad-bc}=a'd-b'c,\quad M=\frac {ab'-a'b}{ad-bc}=ab'-a'b.$$  We have $L>0\iff a'd>b'c \iff a'/b'>c/d.$
We have $M>0\iff ab'>a'b \iff a/b>a'/b'.$
If $0<m$ with $m|L$ and $m|M,$ then $m|(La+Mc)=a'$ and $m|(Lb+Md)=b'$, so $m=1.$
