It is the content of the cover letter that is important, more than the header information.
If you're applying for two different positions, then you should have two cover letters, and two applications, even if there is only one employer. Some software won't allow that (which is what I suspect from your comments).
If you're applying for two different but essentially similar positions, or only one cover letter is allowed, then one cover letter is what you have. In that case, after the section with your own contact information, then put only the most generic of their contact information. You don't need their names or titles in that section, just the company and address. And then address the letter to 'Dear Hiring Manager' or 'Dear Hiring Professor'
City, ST Zip Code
Dear Hiring Manager:
Then, write a compelling cover letter for why you would be a good choice for the job, with specific and pertinent achievements from previous jobs, in a way that augments rather than repeats your resume. That's the important part.