We prove that, for every integer $n\ge2$, a finite or infinite countable group $G$ can be embedded into a 2-generated group $H$ in such a way that the solvability of quadratic equations of length at most $n$ is preserved, that is, every quadratic equation over $G$ of length at most $n$ has a solution in $G$ if and only if this equation, considered as an equation over $H$, has a solution in $H$.
"Embedding of groups and quadratic equations over groups." Illinois J. Math. 60 (1) 99 - 115, Spring 2016. https://doi.org/10.1215/ijm/1498032025