Oops, so sorry, I've just realized that the Compton scattering formula is only applied to cases where electron is initially at rest. I guess solving the energy conservation equation & the momentum conservation equation is inevitable. This problem is not easy
I don't think I understand the statement "...corresponds to the maximum wavelength of the 2.7-K cosmic background radiation." I believe that will give me the answer to the wavelength before collision, and the rest of the answer.
Yes, it gives you the wavelength before collision. But before coming to the rest of the answer (wavelength after collision), calculations must be made.
So here is the way to solve the problem:
1. Calculate the wavelength before collision; this will give you the energy & momentum of photon before collision.
2. In order that the energy loss of electron is max (i.e. to reduce the electron's momentum the most), before collision, the photon should travel in the opposite direction of electron. Besides, you can see that before collision, energy/momentum of photon is very much smaller than energy/momentum of electron. Therefore, we can expect that when the energy loss is max, after collision, the electron and the photon move in the same direction as the electron before collision.
So we know the direction of momentum. The rest is just applying the 2 conservation equations and calculating. In order to simplify the calculation, you should notice that energy of electron is much greater than photon's energy and electron's rest energy.