Step 1: Write the distance condition.
Let
\[
A(-1,0)
\]
and
\[
B(0,2)
\]
Given that the distances of \(P(x,y)\) from \(A\) and \(B\) are in the ratio
\[
\sqrt2:1
\]
Therefore,
\[
\frac{PA}{PB}=\sqrt2
\]
Squaring both sides,
\[
\frac{PA^2}{PB^2}=2
\]
Step 2: Use the distance formula.
Distance from \(A(-1,0)\):
\[
PA^2=(x+1)^2+y^2
\]
Distance from \(B(0,2)\):
\[
PB^2=x^2+(y-2)^2
\]
Using the ratio condition,
\[
(x+1)^2+y^2
=
2\left[x^2+(y-2)^2\right]
\]
Step 3: Expand and simplify.
Expanding the left side,
\[
x^2+2x+1+y^2
\]
Expanding the right side,
\[
2(x^2+y^2-4y+4)
\]
\[
=
2x^2+2y^2-8y+8
\]
Therefore,
\[
x^2+2x+1+y^2
=
2x^2+2y^2-8y+8
\]
Bringing all terms to one side,
\[
0
=
x^2+y^2-2x-8y+7
\]
So,
\[
x^2-2x+y^2-8y=-7
\]
Step 4: Complete the squares.
Completing square in \(x\),
\[
x^2-2x=(x-1)^2-1
\]
Completing square in \(y\),
\[
y^2-8y=(y-4)^2-16
\]
Substituting,
\[
(x-1)^2-1+(y-4)^2-16=-7
\]
Thus,
\[
(x-1)^2+(y-4)^2=10
\]
Step 5: Final conclusion.
Hence, the locus of \(P\) is
\[
\boxed{(x-1)^2+(y-4)^2=10}
\]