Study of molecular interaction in ternary mixtures through ultrasonic speed measurements