See above.When Do we use "ing" after "to" & when do we use simple present?
It was glad to talk?/talking? with you.
You could use both of them:
It was nice/good to talk to you.
It was nice/good talking to you.
(Note we don't say "It was glad to". People are glad.)
I've tried to study?/studying? hard.
Again, both are possible:
I've tried to study hard.
I've tried studying hard.
I would say that with the second example, that probably wouldn't be the end of the sentence: I've tried studying hard but it just doesn't seem to help!
Student or Learner