We are given a polynomial function f of least degree that has rational coefficients, a leading coefficient of $1$, and the given zeros $2i,1-i.$

As we know that the polynomial function has rational coefficients.

so any complex root always appear in pair.

so as $1-i$ is a root of $f(x)$ then it's complex conjugate $1+i$ is also an root of $f(x).$

Hence $f(x)$ could be represented as:

$f(x)=(x-2i)[x-(1-i)][x-(1+i)]$

Simplify each term.

Apply the distributive property.

$f(x)=(x-2i)(x-1\cdot 1+i)(x-(1+i))$

Multiply −1 by 1.

$f(x)=(x-2i)(x-1+i)(x-(1+i))$

Multiply −1 by -1.

$f(x)=(x-2i)(x-1+1i)(x-(1+i))$

Multiply $i$ by $1$.

$f(x)=(x-2i)(x-1+i)(x-(1+i))$

Expand $(x-2i)(x-1+i)$ by multiplying each term in the first expression by each term in the second expression.

$f(x)=(x\cdot x+x\cdot -1+xi-2ix-2i\cdot -1-2ii)(x-(1+i))$

$f(x)=({x}^{2}-x+xi-2ix+2i+2)(x-(1+i))$

Subtract $2ix$ from $xi.$

$f(x)=({x}^{2}-x-xi+2i+2)(x-(1+i))$

Simplify each term.

$f(x)=({x}^{2}-x-xi+2i+2)(x-1-i)$

Expand $({x}^{2}-x-xi+2i+2)(x-1-i)$ by multiplying each term in the first expression by each term in the second expression.

$f(x)={x}^{2}x+{x}^{2}\cdot -1+x2(-i)-x\cdot x-x\cdot -1-x(-i)-xix-xi\cdot -1-xi(-i)+2ix+2i\cdot -1+2i(-i)+2x+2\cdot -1+2(-i)$

Simplify terms.

$f(x)={x}^{3}-2{x}^{2}+{x}^{2}(-i)+xi-{x}^{2}i+xi+2ix-2i+2x-2i$

Subtract ${x}^{2}i$ from ${x}^{2}(-i).$

$f(x)={x}^{3}-2{x}^{2}-2{x}^{2}i+xi+xi+2ix-2i+2x-2i$

Add $xi$ and $xi.$

$f(x)={x}^{3}-2{x}^{2}-2{x}^{2}i+2xi+2ix-2i+2x-2i$

Add $2xi$ and $2ix.$

$f(x)={x}^{3}-2{x}^{2}-2{x}^{2}i+4xi-2i+2x-2i$

Subtract $2i$ from $-2i.$

$f(x)={x}^{3}-2{x}^{2}-2{x}^{2}i$