How do derive the equation for relative velocity of gas molecules
Your equation $v_{rel}=(\frac{16KT}{\pi \frac m2})^{\frac12}$ is incorrect.

$v_{mean}=(\frac{16KT}{\pi m})^{\frac12}$ (your last equation) is also incorrect.

Instead $v_{rel}=(\frac{16KT}{\pi m})^{\frac12}$ and $v_{rel}=(\frac{8KT}{\pi \frac m2})^{\frac12}$ would both be correct.

The need for reduced mass is for when the particles are not the same mass, usually in the context of considering collisions between two different molecules or atoms.  

$\mu = m_1m_2/(m_1 + m_2)$ by definition.  If $m_1 = m_2$ then $\mu = m/2$ 

When there are two different masses, there are two different mean velocities.  

To see where the equation with the reduced mass comes from, look at appendix 1.4 of Kinetic Theory of Gases, along with pages 1-30 to 1-34.