Not sure whether to use the hamiltonian method or the path integral method here. Because the first principals bit is tripping me up
The answer provided by Cosmas is a good one, but I can expand on it a bit by delving into what is meant by "first principles."
The meaning of the Green's function (in time) is the probability amplitude that the state "A" evolves in time $T=t-t_0$ to the state "B." You can write this Green's function using various formalisms (e.g., Hamiltonian, path integral, etc).
Regardless, from first principles, generally the probability amplitude of interest is (in bra/ket notation):
$$
<B|A(T)>
$$
For example, if "A" and "B" refer to position eigenstates then you are interested in:
$$
<y|x(T)>
$$
Or if "A" and "B" refer to momentum eigenstates then you are interested in:
$$
<p'|p(T)>
$$
In the Hamiltonian formalism, the above momentum-space Green's function is very easily evaluated explicitly, as shown by Cosmas.
Whether or not you should use the Hamiltonian or the path integral formalism to write the resulting amplitude is up to you... Or rather, it is up to your teacher; if you are in a path integrals class probably you should be using path integrals.