The composers Wolfgang Amadeus Mozart and Joseph Haydn were friends. Their relationship is not very well documented, but the evidence that they enjoyed each other's company and greatly respected each other's work is strong, and suggests that the elder Haydn acted in at least a minor capacity as a mentor to Mozart. A group of string quartets by Mozart are dedicated to Haydn.
Haydn was already a famous composer when Mozart was a child. His six string quartets of Opus 20 (1772), called the "Sun" Quartets, were widely circulated and are conjectured (for instance, by Charles Rosen) to have been the inspiration for the six string quartets K. 168-173 that the 17-year-old Mozart wrote during a 1773 visit to Vienna.
The two composers probably would not have had an opportunity to meet until after Mozart moved permanently to Vienna in 1781. Haydn was required to reside most of the time at the remote palace of Eszterháza in Hungary, where his employer and patron Prince Nikolaus Esterházy preferred to live. During the winter months, the Prince moved to the ancestral palace of his family in Eisenstadt, bringing Haydn with him. In these periods it was often feasible for Haydn to make brief visits to Vienna, about 40 km away.
As Jones notes, there were various points in the 1770s and early 1780s when Haydn and Mozart might have met, Haydn visiting Vienna from his normal work venues of Esterháza and Eisenstadt, Mozart from Salzburg. The earliest at which it is likely that they would have met is 22 and 23 December 1783. This was the occasion of a performance sponsored by the Tonkünstler-Societät (a charitable organization for musicians) in Vienna. On the program were works by both Haydn (Jones: "a symphony and a chorus, both probably from Il ritorno di Tobia") and Mozart ("a new concert aria, probably 'Misero! o sogno!' [K. 431], and, on the first night, a piano concerto")