I'm not a professional Historian, but this is a handy reference for checking borders. It looks like Afghanistan always separated the two, albeit by a pretty skinny panhandle, and the smallest unit is years. During World War II, however, the Soviet Union and Britain both invaded Iran (The British from India) and their respective occupied territories there were adjacent to one another.