In regards to the equation and integration glaHHg did. It was probably close to the following to find the probability inside the well (which doesn't answer the question about tunneling).
An electron can only have certain values. It is quantized. For each n (quantum number) there is a wavefunction:
psi,n(x) = 2Ajsin((n*pi*x)/a) which is the eigenfunction (aka characteristic function for those that have taken differential equations).
For each n, there is a wavenumber
k,n = (n*pi)/a
and an energy:
En=(h-bar^2*k,n^2)/2*m=(h^2*n^2)/(8*m*a^2)
Int(x=0,x=a,|psi(x)|^2,dx) = Int(x=0,x=a,|2*A*j*sin((n*pi*x)/a)|^2,dx) = 1
Therefore,
A = (1/2*a)^1/2
psi,n(x) = j(2/a)^(1/2)*sin((n*pi*x)/a)
I hope this gives you enough equations to thoroughly confuse most people that read these forums 🙂