Answer:
To give is one of the best things people can do. Volunteering their time showed what caring people they are.
Step-by-step explanation:
Gerunds are the words that are in the "-ing" form of the verb but acts as a noun. On the other hand, infinitives are the verbs that are preceded by "to" but do not act as a verb in the sentence.
In the given sentence, the word "giving" is a gerund while "to volunteer" is an infinitive. Changing these two into an infinitive and a gerund will make the sentence as
To give is one of the best things people can do. Volunteering their time showed what caring people they are.