Imagine I have two $n$ x $m$ assemblies of $P = (n*m)$ unit square cells on the plane, $(c_{(a,1)}, ..., c_{(a,P)}) \in A$ and $(c_{(b,1)}, ..., c_{(b,P)}) \in B$, where every cell, $c_k$, in a particular assembly must have a distinct color/value. Here, $c_{(a,i)} \neq c_{(a,j)}$ & $c_{(b,i)} \neq c_{(b,j)}$ for all possible pairs of $i \neq j$, though it is permitted that $c_{(a,i)} = c_{(b,j)}$ (i.e. it is permitted that $A \cap B \geq 0$). For example, if $N = M = 2$, both $A$ and $B$ would be squares consisting of four cells with distinct colors/values, where some colors/values may overlap between $A$ and $B$.
I can join the cell arrays $A$ and $B$ by partially or fully overlaying the two assemblies under the constraint that the individual cells overlaying one-another in the two assemblies must all have the same colors/values. This is a bit akin to a game of dominoes where no piece can have two copies of the same value or symbol, and instead of juxtaposing the edges of the domino symbols that match, one lays the matching cell(s) of one domino on top of the other under the requirement that no non-matching cells are overlayed.
If the number of cells in the overlay region between $A$ and $B$ is $k$, for what values of $n$ and $m$ (defining the size and geometry of $A$ & $B$) does this uniquely define the geometry of our domino-like construction where $A$ overlays $B$? If this is too broad, what if we set $n = m$?
Update: As per Ben Barber's comment, we can rephrase this question as asking when two rectangles composed of $n$ x $m$ cells can overlap by exactly $k$ cells in a unique way. The colors/values here are meant as a means of breaking rotational and reflection symmetries on the individual rectangular cell arrays. Instead of using colors we could instead require that the $k$-cell overlap "...is unique down to the reflection and rotational symmetries of the individual rectangular cell arrays."