Correct the error in statement (3), if there is one.
(1) If Janet finishes her homework, then she will watch TV.
(2) If Janet watches TV, then she will eat pretzels.
(3) If Janet ate pretzels, then she finished her homework.
There is no error in sentence three. The last sentence is only true, if sentences one and two are true.
To put it another way, if sentence three happened, then it was the logical outcome of the fulfillment of sentences one and two. To put it another way, Janet was able to eat the pretzels, because she did all her homework, which allowed her to watch TV.
If I put it in a propositional way, if a leads to b, and b leads to c, then for c to have happened, a must have happened. From this point of view, there is no logical error in sentence three.