Based on Pigeon hole principle. Try to make maximum ordered pairs such that the condition do not hold. And then add 1 to it and you hve your answer.
$mod4$ divides all the integers into 4 equivalence classes corresponding to the remainders $0,1,2,3$ , Similarly $mod6$ divides all the integers into 6 equivalence classes.
So, to solve this Question, Idea is that fix either $a_1,a_2$ or $b_1,b_2$ and change the other with all the possibilities.
Say, $a_1$ is $0$, then now you can put $6$ possible values for $b_1$. Similarly, when $a_1$ is $1,2,3$.. we will have $6$ possible integer values to put at $b_1$ in each case.
And All these above cases will violate the given condition. But now if you add any more ordered pair, then we will definitely have $2$ ordered pairs such that the given condition holds.
Hence, answer = $4 \times 6 + 1= 25$