Find the parameters given $p(r)=s$ and $p(s)=r$ Problem: Find all values of the parameters $a$ and $b$ for which the polynomial
$x^4+(2a+1)x^3+(a-1)^2x^2+bx+4$
can be factored into two quadratic monic polynomials $p(x)$ and $q(x)$ such that $q(x)$ has two distinct roots $r$ and $s$ and $p(r)=s$ and $p(s)=r$.
My attempt:
I let $q(x)=x^2-\alpha x + \beta$ and $p(x)=x^2+bx+c$
And then using $r^2+br+c=s$ and $s^2+bs+c=r$
Then by adding and subtracting the last two equations, I found
$p(x)=x^2-(1+\alpha) x +\alpha+\beta$
Then i tried to use $p(x)q(x)=x^4+(2a+1)x^3+(a-1)^2x^2+bx+4$ by comparing the coefficients and finding the parameters' possible values. But the computations got messy.
Also, what is bugging is that i did not do anything creative with problem and also i think that the condition $p(r)=s$, $p(s)=r$ can be used in a more elegant way.
I did observe that $r$ and $s$ are roots of $p(p(x))-x$ but couldn't use it.
So, can someone help me?
 A: Let $\alpha = r+s, \beta = rs$ be the sum and product of the roots of the quadratic $q(x)$.  Then we have $p(x) = q(x)-x+\alpha$, so the sum and product of roots of $p(x)$ are $1+\alpha$ and $\alpha + \beta$ .  
Now, for the quartic given, i.e. $=p(x)\cdot q(x)$, using Vieta gives us for sum of roots:
$$-(2a+1) = 2\alpha + 1 \implies a = -\alpha-1$$
and similarly from the $x$ coefft, we get
$$-b = \alpha (\alpha+\beta)+\beta(1+\alpha) $$ 
Hence once we get $\alpha, \beta$ we have $a, b$ well defined.  For those, consider the two remaining coefficients of the quartic.  From the middle term, we have 
$$(\alpha+2)^2=(a-1)^2= \alpha^2+2\alpha + 2\beta \implies \alpha= \beta-2$$
And finally from the product of roots, we get
$$4 = \beta (\alpha+\beta) = \beta(2\beta- 2) \iff 2 = \beta(\beta-1)\implies \beta \in \{2, -1\} $$
A: There is no need to introduce more letters. Apparently, $q(x)=(x-r)(x-s)=x^2-(r+s)x+rs$ and $p(x)=(x-r)(x-s)+r+s-x=x^2-(r+s+1)x+rs+r+s$.
On second thought, since that point we will never see our $r$ and $s$ separately, but only as $r+s$ and $rs$, so it might be a good idea to have some shorthand for these. Say, $r+s=\alpha,\;rs=\beta$, so $q(x)=x^2-\alpha x+\beta$ and $p(x)=x^2-(\alpha+1) x+\beta+\alpha$.
And then, yes, the things would inevitably get somewhat messy.
