Are these two sentences right?

gerund object - I stopped to fix the flat tire.

infinitival object - I stopped fixing the flat tire.

You have infinitives and gerunds mixed up.

Infinitives are to + verb.

Gerunds are verbs used as nouns and ending in -ing.