Would you like to copy the permanent link to your clipboard?
Permanent link:
https://help.openstreetmap.org/questions/40022/overpass-ql-how-to-get-nodes-that-are-connecting-two-ways-and-both-are-belonging-to-the-same-set-of-given-tags/40025