So let's say that there are two messages, $x_1$ and $x_2$, which hash to the same output. In other words, these two messages collide with each other:
$$\operatorname{SHA256}(x_1)=\operatorname{SHA256}(x_2)$$
Questions:
Now, let's say I append identical prefixes and/or suffixes to both $x_1$ and $x_2$:
$$\operatorname{SHA256}(p\mathbin\|x_1\mathbin\|s)\text{ and }\operatorname{SHA256}(p\mathbin\|x_2\mathbin\|s)$$
Now, will $\operatorname{SHA256}(p\mathbin\|x_1\mathbin\|s)=\operatorname{SHA256} (p\mathbin\|x_2\mathbin\|s)$ as well?
Considering another slightly different scenario here - a partial collision rather than a full collision.
Let's say $\operatorname{SHA256}(x_1)$ collides with $\operatorname{SHA256}(x_2)$ in the first 80 bits.
Now, if I add identical prefixes and suffixes to $x_1$ and $x_2$:
$$\operatorname{SHA256}(p\mathbin\|x_1\mathbin\|s)\text{ and }\operatorname{SHA256}(p\mathbin\|x_2\mathbin\|s)$$
Will $\operatorname{SHA256}(p\mathbin\|x_1\mathbin\|s)$ still collide with $\operatorname{SHA256}(p\mathbin\|x_2\mathbin\|s)$ in the first 80 bits as well?