  The Delannoy polynomial $D_n(x)$ is defined by $$
D_n(x)=\sum_{k=0}^{n}{n\choose k}{n+k\choose k}x^k. $$ We prove that, if $x$ is
an integer and $p$ is a prime not dividing $x(x+1)$, then \begin{align*}
\sum_{k=0}^{p-1}(2k+1)D_k(x)^3 &\equiv p\left(\frac{-4x-3}{p}\right)
\pmod{p^2}, \\ \sum_{k=0}^{p-1}(2k+1)D_k(x)^4 &\equiv p \pmod{p^2}, \\
\sum_{k=0}^{p-1}(-1)^k(2k+1)D_k(x)^3 &\equiv p\left(\frac{4x+1}{p}\right)
\pmod{p^2}, \end{align*} where $\big(\frac{\cdot}{p}\big)$ denotes the Legendre
symbol. The first two congruences confirm a conjecture of Z.-W. Sun [Sci. China
57 (2014), 1375--1400]. The third congruence confirms a special case of another
conjecture of Z.-W. Sun [J. Number Theory 132 (2012), 2673--2699]. We also
prove that, for any integer $x$ and odd prime $p$, there holds \begin{align*}
\sum_{k=0}^{p-1}(-1)^k(2k+1)D_k(x)^4 &\equiv p\sum_{k=0}^{\frac{p-1}{2}} (-1)^k
{2k\choose k}^2(x^2+x)^k(2x+1)^{2k} \pmod{p^2}, \end{align*} and conjecture
that it still holds modulo $p^3$.
