$A\neq\emptyset,\; B\neq \emptyset, \;A\times B \;\text{finite} \rightarrow A\; \text{and} \;B $ are both finite too.
Assume on contrary that one of $A$ or $B$ is infinite. WLOG let $A$ infinite and $B$ finite.
$A $ infinite $\rightarrow$ $\exists f:N\to A$ an injection
$B$ finite $\rightarrow \exists g:[n]\to B$ a bijection for some $n\in N$
Since $B\neq \emptyset$ $\rightarrow \exists b_0\in B$
then $h:N \to A\times B$ where
$k\mapsto (f(k),g(k)) $ if $k\in [n]$ and
$k\mapsto (f(k),b_0) $ if $k>n$
This map is injection so $A\times B$ becomes infinite contradiction
Is this proof okay?