Two liquids A and B are in the ratio $5: 1$ in container $1$ and in container $2$, they are in the ratio $1: 3$. In what ratio should the contents of the two containers be mixed so as to obtain a mixture of A and B in the ratio $1 : 1$?

$In~the~above~diagram~proportion~of~substance~A~is~taken~and~alligation~method~is~appilied$