For **associative algebras**, as your required, see Plotkin, *Algebras with the same (algebraic) geometry*, Israel J. Math., 96 (2) (1996), 511–522. This is, being more precise, part of this nice relatively new field of Universal Algebraic Geometry which discuss such things. For a survey I recommend A. Shevlyakov, *Lectures notes in universal algebraic geometry*, https://arxiv.org/abs/1601.02743.