5. Given that the polynomial $x^{2}-x-1$ divides the polynomial $a x^{5}+b x^{4}$ +1 . Then the real numbers $a=$ $\qquad$ ,$b=$ $\qquad$ .
$5 . a=3, b=-5$.
Given that $x^{2}-x-1$ can divide the polynomial $a x^{5}+b x^{4}+1$, there exists a polynomial $f(x)$ such that
$$
a x^{5}+b x^{4}+1=\left(x^{2}-x-1\right) f(x) \text {. }
$$

Let the two roots of the equation $x^{2}-x-1=0$ be $x_{1}$ and $x_{2}$. Then we have
$$
\begin{array}{l}
\left\{\begin{array}{l}
a x_{1}^{5}+b x_{1}^{4}+1=0, \\
a x_{2}^{5}+b x_{2}^{4}+1=0 .
\end{array}\right. \\
\because x_{1} x_{2}=-1 \text {, } \\
\therefore\left\{\begin{array}{l}
a x_{1}^{5}+b x_{1}^{4}+\left(x_{1} x_{2}\right)^{4}=0, \\
a x_{2}^{5}+b x_{2}^{4}+\left(x_{1} x_{2}\right)^{4}=0
\end{array}\right. \\
\Rightarrow\left\{\begin{array}{l}
a x_{1}+b+x_{2}^{4}=0, \\
a x_{2}+b+x_{1}^{4}=0 .
\end{array}\right. \\
\end{array}
$$

Subtracting, we get $a\left(x_{1}-x_{2}\right)=x_{1}^{4}-x_{2}^{4}$;
Adding, we get $a\left(x_{1}+x_{2}\right)+2 b+x_{1}^{4}+x_{2}^{4}=0$.
$$
\text { Hence } \begin{aligned}
a & =\left(x_{1}+x_{2}\right)\left(x_{1}^{2}+x_{2}^{2}\right) \\
& =\left(x_{1}+x_{2}\right)\left[\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}\right] \\
& =1 \times[1-2 \times(-1)]=3 .
\end{aligned}
$$
$$
\begin{array}{l}
\text { Also, } \because x_{1}^{2}+x_{2}^{2}=\left(x_{1}+x_{2}\right)^{2}-2 x_{1} x_{2}=3, \\
x_{1}^{4}+x_{2}^{4}=\left(x_{1}^{2}+x_{2}^{2}\right)^{2}-2\left(x_{1} x_{2}\right)^{2}=9-2=7 . \\
\therefore 3+2 b+7=0 . b=-5 .
\end{array}
$$