you can use this query:
select *
from #tmp
where exists
(
select *
from #tmp2 as t
where
#tmp.data.exist('/RelevanExpertXML/Tel/RelevanExpert[(text()) = sql:column("t.id")]') = 1
)
but it will return you the whole xml. If you want to split xml by rows, you have to use nodes()
function in the from
clause.