finish=verb
eg:-Joe put the finishing touches to his painting
=Joe did the things that made it complete the painting.
Having finished his homework=Upon finishing his homework.
Upon is formal preposition followed by present participle.
Upon finishing his homework=prep. phrase qualifying main clause as manner ,condition.
Upon (4)finishing his homework, Joe ran to the living room to watch cartoons.
(4)finishing=(grammar) a word formed from a verb, ending in --ing(=the present participle as adjective)
Or ending in ---ed, ---en etc(=the past participle as adjective)