A guess to start

Planck's first step was to try to set up an empirical formula which reduces to Wien's at short wavelengths and to Rayleigh-Jeans' at long wavelengths. Mathematically this is not too difficult. Planck achieved such a formula simply by putting an additional term into the denominator of Wien's law. The only justification for this mathematical trick was that it works!