Determine a fourth degree polynomial p that has $p(0), p(1), p(2), p(3), p(4)$ equal to $7, 1, 3, 1, 7$, respectively. Using my ideas, I first write out the points on the polynomial as $(0,7), (1, 1),(2, 3), (4, 7).$ I assume a four degree polynomial will have the general formula $$p(x) = ax^4+bx^3+cx^2+dx+e$$ Since at $x=0$, $p(0) = 7$, it follows that $ e=7.$
My problem now is to find a, b, c, and d.
Lets solve an easier case: $q(x)$ a 2nd degree polynomial and $q(1) = 1$, $q(4) = 3$ and $q(5) = 2$. It's easy to check that the following polynomial expression has the degree we want and when evaluated at 0, 4 and 5 it gives the values we expect:
$$ Q(x) = 1\cdot\frac{(x-4)(x-5)}{(1-4)(1-5)} + 3\cdot\frac{(x-5)(x-1)}{(4-5)(4-1)} + 2\cdot\frac{(x-1)(x-4)}{(5-1)(5-4)} $$
Therefore it must be the polynomial we are looking for, $Q(x) = q(x)$ (though, of course, you have to expand the expression to get the coefficients). Try to understand what is the trick used and then adapt it to your 4th degree polynomial.