how do you solve

f(x)=(x-2) squared

by solve, do you mean find x so that f(x) = 0?

If so, then note that (x-2)(x-2) = 0 only if any of the factors is zero. That means x must b 2.