A sharp regularity result of solutions of a transmission problem