There are lots of such circuits already on the net, and you certainly don't need two PIC's to do it. Where you're getting confused is the receiver, the 40KHz is received by a transducer, amplified, then rectified, giving a DC voltage output, which varies with the strength of the returned signal. You usually use a comparator to detect when it's above a certain level, and generate a logic level output that connects to the PIC.
So the sequence of events goes like this:
1) Generate a short burst of 40KHz.
2) Delay a short while, to allow the receiver to recover from the transmitted burst.
3) Start a counter.
4) Check for a received pulse, and stop the counter once it appears.
5) The distance is represented by the value in the counter.
6) The counter should have an over-flow value, which means a received pulse has not being detected (distance too far).
It's all VERY easily done with a single PIC, and using two would only make it more difficult.