Wave function for particle in a infinite well located at -L and +L
It is very simple, there is no need to solve it again since you already know the solution of infinite square well. The idea is very simple, the trap looks the same, but wider now $2L$. So first you should extend it by a factor of two and then move it back to the center, it is given by the rescaling and translation:
$$L \mapsto 2L \tag{1}$$
$$x \mapsto x-L \tag{2}$$

So the solution is:
$$\psi_{n}=\sqrt{\frac{1}{L}}\sin\left(\frac{n\pi x}{2L}-\frac{n\pi}{2}\right) \tag{3}$$
$$E_{n}=\frac{n^2\pi^2 \hbar^2}{8mL^2}$$
As expected. Note that $\sin(\pi/2-x)=\cos(x)$ so that you can split it into odd and even series, but the Eq (3) given above is more succinct.