This one's all linear algebra all the time: your two lattices can be considered as transformations of a square lattice, taking integer $(i,j)$ through a linear transformation.
The two lattices coincide at a particular point if the $(i,j)$ for a particular lattice point, passed through the transform of that lattice and then the inverse transform of the other lattice, give integer results.
So in this particular case:
the blue lattice is the transformation of the unit square lattice through
$$A = \begin{pmatrix}
1 & \frac{1}{2} \\
0 & \frac{\sqrt{3}}{2} \\
\end{pmatrix}
$$
and the red lattice is the transformation of the unit square lattice through
$$B = \begin{pmatrix}
\frac{7}{2} & -1 \\
\frac{\sqrt{3}}{2} & 2\sqrt{3} \\
\end{pmatrix}
$$
To get the test matrix, we find $$B^{-1}A = \frac{\begin{pmatrix}
4 & 3 \\
-1 & 3 \\
\end{pmatrix}}{15}$$
Now, to discover if a particular point from the blue lattice is also on the red lattice, we simply apply this new matrix to the $(i,j)$ coordinates, and see if the result is in the integers: $(3,1)$ gives $(1,0)$ so is on the red lattice; $(4, -7)$ gives $(\frac{1}{3}, -\frac{5}{3})$ which is not integer so it is not on the red lattice.
int(x) == x
works to check for integerness. – Dan Uznanski May 29 '20 at 15:04