A = 1 + (1 + 1/2 ) + ( 1 + 1/2 + 1/3 ) + ( 1 + 1/2 + 1/3 + 1/4 )
=1+1+1+1+1/2+1/2+1/2+1/3+1/3+1/4
=4+3/2+2/3+1/4
=48/12+18/12+8/12+3/12
=77/12
B = 1/2 + ( 1/3+2/3) + ( 1/4 + 2/4 + 3/4 ) + ( 1/5 + 2/5 + 3/5 + 4/5)
=1/2+3/3+6/4+10/5
=1/2+1+6/4+2
=2/4+4/4+6/4+8/4
=20/4
=5