[tex]\frac{a+1}{b} =\frac{1}{4} =>b=4(a+1)=>b=4a+4[/tex]
[tex]\frac{a}{b+1} =\frac{1}{5} =>5a=b+1[/tex]
[tex]\left \{ {{b=4a+4} \atop {5a=b+1}} \right.[/tex][tex]=> 5a=4a+4+1[/tex]
[tex]5a=4a+5=>5a-4a=5=>a=5[/tex]
[tex]b=4a+4=>b=4*5+4=>b=20+4=>b=24[/tex]