An algorithm to pair up words where a change has been made at a certain position? Say I have a bag of random 'words' of a given length such as:

$$ADHBCBAB$$

Now I make another bag and copy all the words except for making a random change in the 5th position of each word. (Each word is changed in the exact same position to a random letter).

Now I give these two bags of words to someone and they have to 

1) Determine in what position the change was made

2) Pair up the words from each bag

or

3) Determine that such a pairing is impossible (i.e. the first person cheated)

I think this problem is harder than it sounds when you don't know in what position the change was made in. Do you know if this can be translated into a well known problem with a known solution. And weather that solution is Polynomial time?
I don't think it's possible to determine in general. Suppose you start with AB and BA, and the changed words are AA and BB. Which letter was changed?
The edit distance algorithm is a popular algorithm for pattern matching. You can read about the algorithm on Wikipedia: https://en.wikipedia.org/wiki/Edit_distance