Constructing a polynomial with integer coefficient's sharing roots with another two polynomials 
Let $i$ be a root of the equation $ x
^2 + 1 = 0 $and let $ω$ be a root of the
equation $x^2 + x + 1 = 0$. Construct a polynomial $f(x) = \sum_k a_k x^k$  with $a_k \in \mathbb{Z}$ such that $f(i+w)=0$. Source

After some long thought, I got a 'partial' construction for $f$: let $q(x) =x^2 +1$ and $p(x) = x^2 + x+1$, then:
$$ f(x) = q(x- \omega) + p(x- i)$$
However, the above doesn't necessarily satisfy the 'integer' coefficients criteria and may contain an imaginary part, so I modified the construction a bit to fix the second problem and got:
$$ f(x) = q(x- \omega) + p(x-i) + \overline{ p(x-i) + q( x - \omega)}$$
Problem: The above has no guarantee to have integer coefficients and the expression also has terms of $\overline{x}$ i.e: complex conjugate of $x$.
 A: Following ancient mathematician's comment: $$ \alpha-i = \omega$$ and  we know $\omega$ satisfies $x^2 + x+1=0$, upon substitution:
$$ (\alpha-i)^2 + ( \alpha -i ) +1=0$$
Simplifying:
$$\frac{ \alpha^2  + \alpha}{1+ 2 \alpha}= i$$
Then following the second suggestion from AncientMathematician (perhaps derived from their experience ), we square both sides:
$$ \frac{\alpha^4 + \alpha^2 + 2 \alpha^3}{1 + 4 \alpha^2 + 4 \alpha } =-1$$
Finally:
$$ \alpha^4 + 5 \alpha^2 + 4 \alpha + 1 + 2 \alpha^3= 0$$
If I had made no algebra mistakes, this should be the construction.
A: $\newcommand{\Q}{\Bbb Q}$Consider the tower of fields $$\Q \subsetneq \Q(\iota) \subsetneq \Q(\iota, \omega).$$
It is easy to see that each inclusion is strict. Since $\iota$ and $\omega$ both satisfy quadratic equations over $\Q$, it follows that each extension above is of degree $2$. Thus, there are exactly four $\Q$-embeddings $\sigma_1, \ldots, \sigma_4 : \Q(\iota, \omega) \to \Bbb C$. These are given as (taking combinations of):

*

*Send $\iota$ to either $\iota$ or $-\iota$,

*Send $\omega$ to either $\omega$ or $\omega^2$.

We can do these independently, thanks to the tower above and the fact that the irreducible polynomial of $\omega$ over $\Q(\iota)$ is the same as that over $\Q$.
Now, we have the element $\alpha = \iota + \omega \in \Q(\iota, \omega)$. It has four Galois conjugates: $\sigma_1(\alpha), \ldots, \sigma_4(\alpha)$. Then, the polynomial
$$f(x) = (x - \sigma_1(\alpha)) \cdots (x - \sigma_4(\alpha)) \tag{1}$$
has coefficients in $\Bbb Q$. If need be, you can scale it up to have coefficients in $\Bbb Z$.

So even if you don't understand why the above works, here is how you get the polynomial: Expand out $(1)$. Here are the values that you can use:

*

*$\sigma_1(\alpha) = \iota + \omega$,

*$\sigma_2(\alpha) = -\iota + \omega$,

*$\sigma_3(\alpha) = \iota + \omega^2$,

*$\sigma_4(\alpha) = -\iota + \omega^2$.

Note that $\sigma_1(\alpha) = \overline{\sigma_4(\alpha)}$ and $\sigma_2(\alpha) = \overline{\sigma_3(\alpha)}$, if that helps with calculations.

Side note: the fact that all the $\sigma_i(\alpha)$ turn out to be distinct tells us that we can't do better than a four degree polynomial.
A: Multiplying $\,\alpha=\omega+i\,$ by $\,i\,$ and using that $\,i^2=-1\,$:
$$
\begin{align}
\begin{cases}
\alpha &= \omega+i
\\ i \,\alpha &= i \omega - 1
\end{cases}
\end{align}
$$
Eliminating $\,i\,$ between the two equations, for example by taking $\,i=\alpha-\omega\,$ from the first equation and substituting into the second one:
$$
\alpha^2 - 2\omega\alpha + \omega^2+1=0
$$
Using that $\,\omega^2=-\omega-1\,$:
$$
\alpha^2 - 2\alpha\omega - \omega=0
$$
Multiplying by $\,\omega\,$ and using that $\,\omega^2=-\omega-1\,$:
$$
\require{cancel}
\begin{align}
\begin{cases}
\alpha^2 - \omega (2\alpha + 1) &= 0
\\ \omega\,\alpha^2 + (\omega+1)(2\alpha+1) &= 0
\end{cases}
\;\;\iff\;\; \begin{cases}
- \omega\,(2\alpha+1) + \alpha^2 &= 0
\\ \omega\,(\alpha^2+2\alpha+1) + 2\alpha+1&=0
\end{cases}
\end{align}
$$
Eliminating $\,\omega\,$ between the two equations:
$$
(\alpha^2+2\alpha+1)\alpha^2+(2\alpha+1)^2 = 0
 \;\;\;\;\iff\;\;\;\; \alpha^4 + 2 \alpha^3 + 5 \alpha^2 + 4 \alpha + 1 = 0
$$
With $\,P(x)=x^2+1\,$ and $\,Q(x)=x^2+x+1\,$, the above procedure is equivalent to calculating the polynomial resultant of $\,P(x)\,$ and $\,Q(\alpha-x)\,$, as verified in WA. A similar procedure can be used for higher degrees to produce a polynomial having as roots the sums of roots of $\,P\,$ and $\,Q\,$ with coefficients in the same ring as those of $P,Q$, in this case $\mathbb Z\,$.
