A question I have been given for an assignment is as follows. If $P$ is an odd prime number such that $P=2k+1$, then prove $(k!)^2\equiv (-1)^{k+1} \mod P$
Hint: Try to see how to group the terms in the product $$ (P-1)!=(2k)!=1*2*3*...*(2k-2)*(2k-1)*(2k) $$ to get two products, each equal to $k!$ modulo $P$.
Given this is an assignment for a grade I am not looking for anyone to provide a full answer, but I would appreciate direction on how to begin solving this and what knowledge to apply. I've tried creating and attempting to relate equivalent expressions for multiple parts of the problem and hint, but I honestly do not feel as if I'm even working in the right direction towards the goal.
Hint. Use Wilson's theorem, which states that $(P-1)!\equiv(-1)\pmod{P}$. And then, from $2k \equiv -1 \pmod{P}$, $2k -1 \equiv -2 \pmod{P}$,..., and $k-1 \equiv -k \pmod{P}$, you can follow to the desired congruence.