For two equal-length binary strings $x$ and $y$, let $d(x,y)$ denote the Hamming distance. Prove or disprove: there exists a positive integer $k$ such that the language $\{x2y : |x| = |y|, x\in A, y\in\{0,1\}^*,d(x,y) = k\}$ is context-free for some infinite regular language $A$ over the alphabet $\{0,1\}$.
I think the statement is false. Intuitively, context-free grammars cannot keep track of the number of positions where strings differ, but I'm not sure how to use the pumping lemma for this case. If $k=1$, then I'd need show that the given language isn't context free for any infinite regular language $A$. If we consider the regular language generated by $0^*$ for instance, then the language would consist of all strings $0^n 2 y$ where $y$ has length $n$ and exactly one $1$. If $A$ were finite, obviously the given language would be context-free for all $k$ because it would be finite.
This question was based off of this other post.