For any wave (that stays in the same medium), the product of
(frequency) times (wavelength)
is always the same number. (It's the speed of the wave).
So if the frequency or wavelength suddenly gets multiplied by some number, then the other one immediately gets divided by the same number ... so that their product stays the same.
That means that if one gets bigger, the other one gets smaller.