If A+tB is nilpotent for n+1 distinct values of t, then A and B are nilpotent. 
Suppose $A$ and $B$ are $n\times n$ matrices over $\mathbb{R}$ such that for $n+1$ distinct $t \in \mathbb{R}$, the matrix $A+tB$ is nilpotent. Prove that $A$ and $B$ are nilpotent.  

What I've tried so far:
 Define $f(t)=(A+tB)^n$. Then $f(t)$ has polynomials of degree at most n as its entries. Each of these polynomials has n+1 distinct roots, and hence is the constant zero polynomial. This shows that for all $t \in \mathbb{R} \ f(t)=0$, which in particular gives $A^n= f(0) =0$ that shows A is nilpotent.
Now if none of the $t_1,...t_{n+1}$ , that make A+tB nilpotent, is zero, we can use $g(t)=(tA+B)^n$ with roots $\frac{1}{t_i}$ similarly and show that B, too, is nilpotent. But I have no idea in case one of the $t_i$ is zero.
Thanks in advance.

One can do it this way.
Consider the polynomial in the two variables $t, \lambda$
$$
(-1)^{n} \det((A + t B) - \lambda I).
$$
Consider this as a polynomial in $t$, of degree $n$, with coefficients in the field of rational functions $\mathbb{R}(\lambda)$. By hypothesis, for $n+1$ distinct values of $t$, it coincides with  $\lambda^{n}$, so that one has the equality
$$
(-1)^{n} \det((A + t B) - \lambda I) = \lambda^{n}
$$
of polynomials in $t, \lambda$. So we can substitute anything in $t$ or $\lambda$, and it will still be an equality. Substitute $t^{-1} \mu$, where $\mu$ is another indeterminate, for $\lambda$, and $t^{-1}$ for $t$ so that we have
$$
(-1)^{n} \det((A + t^{-1} B) - t^{-1} \mu I) = (t^{-1} \mu)^{n}.
$$ 
 Considering this equality in the field of rational functions, we can multiply by $t^{n}$ and obtain
$$
(-1)^{n} \det((t A + B) - \mu I) = \mu^{n}.
$$
This is now an identity of polynomials in the indeterminates $t, \mu$. 
Finally set $t = 0$ to get that the characteristic polynomial of $B$ is $\mu^{n}$, up to the sign, so that $B$ is also nilpotent.

Note that the basic trick is a common one, and appears for instance in applying Eisenstein's criterion to prove that the $p$-th cyclotomic polynomial has degree $p-1$, when $p$ is prime. That is, one has a prime $p$, and wants to prove that if $x = 1 + t$, then
$$\tag{equality}
x^{p-1} + x^{p-2} + \dots + x + 1 =\\=
t^{p-1} + \binom{p}{p-1} t^{p-2} + \dots + \binom{p}{2} t + \binom{p}{1}.
$$
One argues that
$$
x^{p} - 1 = (x-1) (x^{p-1} + x^{p-2} + \dots + x + 1),
$$
and then substituting $x = 1 + t$ one has
\begin{align}
x^{p} - 1
&=
(1+t)^{p} - 1 
\\&= \left( \sum_{i=0}^{p} \binom{p}{i} t^{i} \right) - 1
\\&=
t \cdot \sum_{i=1}^{p} \binom{p}{i} t^{i-1}
\\&=
t \cdot (t^{p-1} + \binom{p}{p-1} t^{p-2} + \dots + \binom{p}{2} t + \binom{p}{1}).
\end{align}
Now you can divide by $t = x - 1$ and get the required (equality), which is an equality of polynomials, and thus still holds when $t = 0$ (and thus $x = 1$), despite the fact that we have divided by $t$.
