Son 1 owns Horse A and Son 2 owns Horse B. The one who owns the slowest horse gets the inheritance. After they switch horses, Son 1 is on Horse B and Son 2 is on Horse A, but each still owns the other horse. So now, racing at full speed, whichever son wins, the other son will have the faster horse, meaning the winner gets the inheritance.