My book (Physics for JEE Advanced, Waves and Thermodynamics, B. M Sharma, Cengage learning) says that Thermal conductivity of pure metals decreases with increase in temperature, while for alloys, thermal conductivity increases with increase in temperature. Now this is quite confusing to me. After a search I found one site claim that the thermal conductivity decreases due to decrease in the mean free path of the electrons(here). But then why does thermal conductivity of alloys increases with increase in temperature ? Please help me.
Your book is wrong (or at least, overly general). Non-monotonic behaviors (i.e., increases and decreases) are seen with temperature changes for the thermal conductivity of even pure metals. See, for example, slide 20 here:
Totton's Steel Heat Treatment Handbook reports that the thermal conductivity "decreases with increasing temperature for pure iron, plain carbon steels, and low-alloy steels", whereas it increases for "high-alloy steels such as ferritic and martensitic steels":
Looking at it from the other direction, consider a metal with a strong negative temperature coefficient of thermal expansion, say, tungsten. The addition of a few impurity atoms technically forms an alloy, but I wouldn't expect any dramatic changes in thermal conductivity. So the book's blanket statement is much too general.
What your book may be trying to say is that in pure metals, thermal energy is often transferred primarily by electrons (as opposed to phonons). As the temperature increases, these electrons tend to be more easily scattered, thus suppressing that mode. This mechanism would explain the often-seen negative temperature coefficient for thermal conductivity in pure metals.
But the electronic thermal conductivity is also suppressed by increasing solute concentration in alloys, also attributed to scattering. (The lattice thermal conductivity, which is mediated by phonons, is typically also suppressed but to a lesser degree.) As a result, lattice thermal conductivity may become the dominant effect, and this mode exhibits a strong positive temperature coefficient because phonons are thermally excited.
The temperature dependence of thermal conductivity also depends on the forming method (which alters the grain size, for example) and on impurities, among other factors. Although certain trends can be reasonably explained, it's not an area in which you can expect broad statements comparing pure metals to alloys to hold across a variety of conditions.