How do you contest a ticket for passing in a 'no passing' zone when the driver of a slow moving semi-tractor trailer motioned for you to pass him in New York?

You don't. No passing means "no passing" and a big rig driver does not have the authority to tell vehicles to pass. Pay the ticket and consider it a lesson learned even though it was the result of an act of courtesy.