we know the roots
x=2+i
x=1
x=-1/2
By the conjugate theorem
The fourth root is x=2-i
Write the polynomial in factored form
The factors are
x=2+i --------> [x-(2+i)]
x=2-i---------> [x-(2-i)]
x=1 --------> (x-1)
x=-1/2 --------->( x+1/2)
so
f(x)=a[x-(2+i)]* [x-(2-i)]*(x-1)*(x+1/2)
where
a is the leading coefficient
Multiply [x-(2+i)]* [x-(2-i)]
[x-(2+i)]* [x-(2-i)]=x^2-x(2-i)-x(2+i)+4-i^2=x^2-2x+xi-2x-xi+4+1
so
x^2-4x+5
substitute
f(x)=a(x^2-4x+5)(x-1)(x+1/2)
Multiply (x-1)(x+1/2)
(x-1)(x+1/2)=x^2+0.5x-x-0.5=x^2-0.5x-0.5
substitute
f(x)=a(x^2-4x+5)(x^2-0.5x-0.5)
Multiply
f(x)=a[x^4-0.5x^3-0.5x^2-4x^3+2x^2+2x+5x^2-2.5x-2.5]
f(x)=a[x^4-4.5x^3+6.5x^2-0.5x-2.5]
For a=1
The answer is
f(x)=x^4-4.5x^3+6.5x^2-0.5x-2.5