difference between the energy level in the x and y direction can b 1?
I am not sure what you mean by that. It sounds like you haven't solved the schrod. eq. for a 2D PIB yet.
I will assume that you have solved, or have seen the derivation of the energy eigen state for the inf. sq. well (a.k.a. 1D PIB).
Set up your schrod. equation again in the same fashion, but instead of only using (d/dx)2, rewrite it as del2 operator. Note, however, that your del operator only spans the x and y directions.
So your sch. eq. will look like hbar^2/2m*(d2/dx2 + d2/dy2)*psi(x,y) + V(x,y)*psi(x,y) = E*psi.
But you know (PIB) that V(x,y) = 0 for x,y inside the area of interest.
Now simply solve your second order differential equation. Assume that psi is separable i.e., that it can be written as the product of two separate functions A(x)*B(y).
Solve using separation of variables. It really turns out quite nicely. In fact, you could probably have guessed the soln from the 1D PIB, and you will be able to guess the soln to the 3D PIB after this, i'm sure.