Because they're at different distances, they interfere differently depending on the angle ϕ from the thing.
ψA(x)=aeiϕA,ψB(x)=aeiϕB
To predict the probability of a particle at (x,y) where L is the distance from the slit plane to the screen, λ is the wavelength of the particle. a is the amplitude size of the wave and d is the slit separation
ϕ=λ2πr=kr,k=λ2π
Where r is the distance the wave travels. The distances rA,rB are the distance from slit A,B to the point