I';m not sure why you think you need nested loops - all you need to do is look and see if there is a specific character in the string already.
Here is what I'd do:
private string RemoveThese(string input, string remove)
{
foreach (char c in remove)
{
int found = input.IndexOf(c);
if (found >= 0) input = input.Remove(found, 1);
}
return input;
}
What it does is finds and removes all the characters in the remove string by checking if the IndexOf (which finds the first time it matches) is valid, and removing the character if it is.
All you then have to do is call the method twice:
string output = RemoveThese(name1, name2) + RemoveThese(name2, name1);
(As it happens, that isn't the way I'd do it - it is horribly inefficient since it creates new strings left right and centre, since strings are immutable - but since I suspect you haven't got to the StringBuilder class yet, I didn't want to confuse you)