When the verb has the force of a noun it is called gerund. In both of the sentences 'working' is used as a verb (in continuous tense). In the above sentences (a) 'working' has the force of a noun and it functions as a noun, so it is gerund.
What is a gerund example?
A gerund is a form of a verb that ends in -ing that is used as a noun. ... It looks like a verb, but it acts like a noun. For example, the word swimming is an example of a gerund. We can use the word swimming in a sentence as a noun to refer to the act of moving around in water as in Swimming is fun.
Is working hard a gerund?
Re: hard working/ working hard/ hard work
HARD WORKING will be the object of the preposition 'of'. A form of the verb ending in ING and used as a noun is a gerund. WORKING is a gerund with a modifier HARD.