Did it in my head by trial and error. Luckily x is an integer.
Guilty feelings here and no pencil ✏️ required.