应该是,Mary (doesn't have) to finish her homework before dinner.
因为原句里用的是 has,所以改为否定句要用 doesn't have.希望对你有帮助—— ♥