The technical steps in previous answers seem easy to check but hard to understand, as users stated in the comments. The magical identity is:
$$p||x||^2+(1-p)||y||^2-||px+(1-p)y||^2=p(1-p)||x-y||^2,$$
for every $p\in [0,1]$ and $x,y\in R^d$.
For the case $d=1$, let $X$ be a Bernoullii distribution variable such that $Pr(X=1)=p$. Hence, for $Z=(x-y)X+y$, we have $Z=x$ with probabilty $p$, and $Z=y$ with probability $1-p$. Therefore,
$$px^2+(1-p)y^2-(px+(1-p)y)^2
=E[Z^2]-E^2[Z]=VAR(Z)=VAR((x-y)X)=(x-y)^2 VAR(X)=(x-y)^2 p(1-p).
$$
For $d\geq 2$:
$$p||x||^2+(1-p)||y||^2-||px+(1-p)y||^2
=\sum_{i=1}^d \Big(px_i^2+(1-p)y_i^2-(px_i+(1-p)y_i)^2\Big)=\sum_{i=1}^d \Big(p(1-p)(x_i-y_i)^2\Big)=p(1-p)||x-y||^2,$$
where the second equality is due to the case $d=1$.
Intuition:
Usually, when there is $p\in[0,1]$ and $1-p$ there must be a relation to probability theory. The right hand side is the variance $VAR(X)$ of a random variable $X$ with Bernoulli distrubution of probability $p$, after assuming $x-y=1$ and $x\geq y$ wlog. Otherwise, divide both $x$ and $y$ by $x-y$, and switch between $x$ and $y$ if necessary. For $x=1$ and $y=0$, let $Pr(X=1)=Pr(X=x-y)=Pr(X=x):=p$ and $Pr(X=0)=Pr(X=y):=1-p$, to obtain
$$px^2+(1-p)y^2-(px+(1-p)y)^2
=E[X^2]-E^2[X]=VAR(X)=
=p(1-p).$$
More generally, for $x\in R$ and $y=x-1$, recall that the variance is invariant to translation. So, replace $X$ by $X+y$ that equals to $(x-y)+y=x$ with probability $p$, and $X+y=0+y=y$ otherwise, to obtain
$$px^2+(1-p)y^2-(px+(1-p)y)^2
=E[(X+y)^2]-E^2[X+y]=VAR(X+y)=VAR(X)
=p(1-p).$$