If $A$ and $B$ share the same nullspace, then by the rank nullity theorem, they have the same row rank and column rank. This allows us to find a special isomorphism between the two.
Pick a set $\{x_1\dots x_k\}$ such that $\{Bx_i\mid 1\leq i\leq k\}$ is a basis for the columnspace of $B$.
Exercise: prove that the set $\{Ax_i\mid 1\leq i\leq k\}$ is also linearly independent, so that it is a basis for the columnspace of $A$. Now we can complement the $x_i$ we already have by picking $x_{i+1},\dots x_n$ to be a basis for the nullspace of $A$ and $B$, and then $x_1,\dots, x_n$ is a basis for the entire domain $F^n$.
By the mapping property of bases, there exists a unique transformation that sends $Bx_i\mapsto Ax_i$ for all $i\in \{1,\dots,k\}$, and it can be expressed as a nonsingular square matrix $C$, and we have that $CBx_i=Ax_i$. For the $i> k$, $CBx_i=0=Bx_i=Ax_i$. Since $CB$ and $A$ match on a basis, they are actually identical transformations from $F^n\to F^m$.
This shows that $A$ and $B$ are row equivalent, via the nonsingular matrix $C$.
The following example shows that it's important that the entire kernel matches, and not just part:
$X=\begin{bmatrix}0\\0\\1\end{bmatrix}$
$A=\begin{bmatrix}1&0&0\\0&0&0\\0&0&0\end{bmatrix}$
$B=\begin{bmatrix}0&1&0\\0&0&0\\0&0&0\end{bmatrix}$