The maximum principle for a differential inclusion problem