In دَعْ مَا يَرِيبُكَ إِلَى مَا لَا يَرِيبُكَ, the two occurrences of مَا point to contrasting matters. The first causes doubt; the second is negated by لَا. Keeping that contrast intact preserves the meaning.
In وَأَتْبِعِ السَّيِّئَةَ الْحَسَنَةَ تَمْحُهَا, the order shows what follows what: a good deed follows a wrong one. The final pronoun ـهَا refers back to the wrong deed.
Accurate translation requires more than separate word definitions. The relationship between clauses and the reference of a pronoun also matter.