I am in need of a grammar expert! I am trying to find the answer as to why in the first example it is okay to use both the gerund and infinitive where as in the second example only the infinitive can be used.

1. I haven't been able to get in touch with Shannon. I tried ___ her. I tried ____ her a letter. I tried ____ a message with her brother when I talked to him. Nothing worked.
gerund: calling, writing, leaving/infinitive: to call, to write, to leave
(the answer key states both are correct)
2. I always try ___ my bills on time, but sometimes I'm a little late.
gerund: paying/infinitive: to pay
(the answer key states that only the infinitive can be used)

Is the answer key incorrect? I have been doing much research with little outcome so if anyone has the answer I would greatly appreciate it!
The gerund is commonly used after try when something is suggested as a solution to a minor or major problem:

If you don't like the climate in England, try leaving the country!

Many learners have asked the same question and as much as I hate to disappoint you, there are grammar rule that don't fully explain the "whys" in English. The verb "try" is one of those exceptions that can either take an infinitve or gerund form depending on context.

He has tried to quit smoking before but failed. Here "to quit" will be the correct form, at leadt idomatically.

I am trying to finish my work. I will call you later. Same case.

I always try to pay my bills on time.

Where were you; we'd tried to call/ calling you all day.
 Cool Breeze's reply was promoted to an answer.