Let $a$ and $b$ be two numbers,
Number of divisors of $a$ is $n_1$;
Number of divisors of $b$ is $n_2$;
How to find the number of divisors $N$ of product $a \times b$ by using known number of divisors of factors $n_1$ and $n_2$?
If $a = 20$ and $b = 21$, then $n_1 = 6$ (number of divisors of $a$), $n_2 = 4$ (number of divisors of $b$. Then $a \times b = 420$ and $N = 32$ (number of divisors of $a \times b$).
Is there a formula to find $N$ in terms of $n_1$ and $n_2$?
If $a$ and $b$ are coprime, then $\tau(ab)=\tau(a)\tau(b)$.
In your example, this gives you $\tau(420)=24$, not $32$. Check your work.
I don't know a formula for $\tau(ab)$ when $a$ and $b$ have a nontrivial common factor, unless you can factor $a$ and $b$ into primes.