The clustering of the SDSS-IV extended Baryon Oscillation Spectroscopic Survey DR16 luminous red galaxy and emission line galaxy samples: cosmic distance and structure growth measurements using multiple tracers in configuration space