Extremal functions and best constants to an inequality involving Hardy potential and critical Sobolev exponent