5. 147 Find all polynomials in two variables that satisfy the following conditions:
(1) $P$ is homogeneous of degree $n$. That is, for all real numbers $t, x, y$, we have
$$P(t x, t y)=t^{n} P(x, y)$$
(2) For all real numbers $a, b, c$,
$$P(a+b, c)+P(b+c, a)+P(c+a, b)=0$$
(3) $P(1,0)=1$.
[Solution] Let $P$ be an $n$-degree polynomial satisfying conditions $(1) \sim(3)$. Since a constant polynomial cannot satisfy both (2) and (3) simultaneously, we have $n \geqslant 1$.

In (2), let $a=b, c=-2 a$, then by the homogeneity of $P$ we get
$$\begin{aligned}
0 & =P(2 a,-2 a)+P(-a, a)+P(-a, a) \\
& =\left[(-2)^{n}+2\right] P(-a, a)
\end{aligned}$$

If $n>1$, then $P(-a, a)=0$, hence $P(x, y)$ is divisible by $x+y$.
$$\text { Let } P(x, y)=(x+y) P_{1}(x, y) \text {, }$$

then from (2) we get
$$\begin{array}{l}
P_{1}(a+b, c)(a+b+c)+P_{1}(b+c, a)(a+b+c)+ \\
P_{1}(c+a, b)(a+b+c)=0
\end{array}$$

Thus, $P_{1}(a+b, c)+P_{1}(b+c, a)+P_{1}(c+a, b)=0$, and $P_{1}$ is still homogeneous,
$$\text { and } \quad P_{1}(1,0)=P_{1}(1,0)(1+0)=P(1,0)=1 \text {, }$$

i.e., $P_{1}$ also satisfies conditions $(1) \sim(3)$, and its degree is $n-1$.
If $n-1>1$, we can similarly construct an $(n-2)$-degree homogeneous polynomial $P_{2}$, which satisfies conditions $(1) \sim(3)$, and
$$P_{1}(x, y)=(x+y) P_{2}(x, y)$$

Continuing this process, we will eventually obtain a linear polynomial
$$P_{n-1}(x, y)=m x+n y$$

By condition (2) with $a=1, b=c=0$, we get $2 m+n=0$,
and by (3) we get $m=1$, hence $n=-2$, and
$$\begin{aligned}
P(x, y) & =(x+y)^{n-1} P_{n-1}(x, y) \\
& =(x+y)^{n-1}(x-2 y)
\end{aligned}$$

It is not difficult to verify that polynomials of this form indeed satisfy conditions (1) to (3). Thus, we have found all homogeneous polynomials satisfying conditions $(1) \sim(3)$.