Suppose H is some hash function (such as MD5 or SHA256 or whatever) and I have a collision for this hash: two different pieces of data x and y, that have the same hash.
In other words x≠y but H(x)=H(y).
Now if I concatenate some random data z, will H(x+z) be the same as H(y+z) ?
The idea is: x and y being a collision may imply that they happen to bring the H function in the same state (thus resulting in the same hash). From that point on, it doesn't matter what other data we append, their hashes will remain equal.
I tested the above for this MD5 collision and it seemed to work there. But I don't know if this is true in general?