The better way to combine hashcodes

For example, two int numbers x and y. A simple way is like below:

But it’ll be easily result in collision. To avoid this, Joshua Bloch performed an elegant way to combine two hashcodes:

The usage of the prime numbers are the most brilliant part of the algorithm.