Answer:
21 and 22
Explanation:
Let the two whole numbers be a and b.
Their product is 462. Hence, we can write that:

Likewise, because their sum is 42:

This yields a system of equations:

We can solve the system using substitution.
Isolating one variable in the second equation yields:

From substitution:

Distributing yields:

Solve for b by factoring:

Solve for a:

In conclusion, the two whole numbers are 21 and 22.