Equation with given solutions and extraneous solutions

I was teaching students to be careful when solving equations, and told them they need to work with equivalences or check solutions at the end. One example of equations we considered was $$2x=1-\sqrt{2-x}$$. Often, the equation is solved that way:

$$2x=1-\sqrt{2-x}$$

$$\sqrt{2-x}=1-2x$$

$$2-x=(1-2x)^2$$

$$2-x=1+4x^2-4x$$

$$4x^2-3x-1=0$$

The discriminant of the last equation is $$\Delta=25$$ so $$4x^2-3x-1=0$$ has two solutions: $$1$$ and $$-1/4$$.

By plugging into the original equation, it is clear that $$1$$ is not a solution (textbooks sometimes call it an "extraneous solution") but $$-1/4$$. The reason is that every equation in the chain is equivalent to the previous one, except that the second only implies the third one ($$2-x=(1-2x)^2 \iff 1-2x=\pm\sqrt{2-x}$$ and $$1$$ is the solution of $$1-2x=-\sqrt{2-x}$$).

Question: given $$s_1,\dots,s_k$$ and $$x_1,\dots x_q$$ different real numbers, find an equation whose set of solutions is $$\{s_1,\dots,s_k\}$$ and $$x_1,\dots,x_q$$ appears "naturally" as extraneous solutions.

My "attempt" and remarks:

1. From the example above, I am looking for equations of the form $$P(x)=\sqrt[r]{Q(x)}$$ where $$P$$ and $$Q$$ are polynomial functions, so $$P(x)^r-Q(x)=0$$, but I cannot see how to choose $$P$$ and Q.
2. Other forms are welcome. For example, equations with absolute values like $$|x+1|=2x+4$$ tend to have extraneous solutions.
3. "naturally" is subjective and hard to define. I am asking the question for educational purposes, so "naturally" roughly means here "using a valid algebraic step that an average high school student would do". For example, we can always add extraneous solutions via the implication $$(x-s_1)\dots(x-s_k)=0 \implies (x-s_1)\dots (x-s_k)(x-x_1)\dots(x-x_q)=0$$ but I don't think we can call this "natural".

$$x\left(1+\sqrt{1-x^2}\right)=\sqrt{1-x^2}$$