Fourire's integral theorem says that if p(x), a complex valued funtion of one real variable, is square integrable (that is, the definite integral of it's modulus squared over all x exists) then

p(x) = (2#)1/2all kT(k)eikxdk

where
T(k) = (2#)1/2all xp(x)e-ikxdx

this is like having two equations and two unknowns. Combine the expressions.

p(x) = (2#)1/2all k(2#)1/2 all x'p(x')e-ikx'dx eikxdk
= [1/(2#)]all k all x'p(x')e-ikx'dx eikxdk

reversing the order of integration
(There may be some mathematical problem with this)

=[1/(2#)] all x'all kp(x')e-ikx'eikxdkdx'
= all x'p(x')all ke-ik(x-x')dkdx'

checkout the inside integral:

all ke-ik(x-x')dk
When x is not eaqual to x' it gives
limk to infinity[i/(x-x')] {e-ik(x-x')-eik(x-x')}
= limk to infinity[2/(x-x')]sin[k(x-x')]