Yes, they are compatible. Nikon D50 is a camera with an APS-C sensor, lenses from Nikon that are specially designed for this sensor size have a DX in their name. AF-S indicates the type of autofocus motor from the lens. The D7200 can use both older AF-D and AF-S lenses for autofocus.