As far as I understand, you define to be conditioned to be at distance smaller than to , right? In other words, you sample and repeatedly until they are closer than from each other and then you set . Is that indeed it?
If so, first the law of should not symmetric with respect to and as they have different roles. And second there is no meaning to writing as a function of which are not defined in terms of ? So something has to be wrong; it may be my understanding, but let's carry on.
Given my rewriting of the problem, the pdf of is derived as follows (I use a slightly sloppy notation "dx" that stands for an "infinitesimal subset around x"; you can turn it to fully rigorous by writing a Borel set A instead of dx, but I feel this writing with dx gives more feeling of what happens):
so the pdf is the function on the right hand side.
If is continuous at , the integral at the numerator is close to when is small. Then, for small , one may say that the pdf of is close to , where (so that integrates to 1).
I hope this answers your question. Feel free to ask for further details. Or to make your question more specific, if I got it wrong.