This question is from a previous exam paper that I am using to revise. As per the rules of the School of Maths and Stats in my university they are not allowed to give out solutions to previous exams.
I know there is some "identity formula" that I could use, but I don't know what it is.
Impossible - it's trivially equivalent to Wilson - put $\,n=(p-2)!\,$ below.
$$\bmod p\!:\ \, n\equiv 1\iff (p\!-\!1)\,n\equiv -1\qquad\qquad $$
So the congruences are just negations $\!\bmod p\,$ of each other. Any proof of $\,(p\!-\!2)!\equiv 1\pmod{\!p}$ immediately yields a proof of Wilson's Theorem by simply multiplying by: $\,p\!-\!1\equiv -1$.
More generally Wilson's Theorem is equivalent to the Wilson reflection formula below
$$\quad (p\!-\!1\!-\!k)!\equiv\frac{(-1)^{k+1}}{k!}\!\!\!\pmod{\!p},\ \ 0\le k < p\,\ {\rm prime}$$
OP is the special case $\ k = 1$.