What does 之为 mean in 如果把人生比之为杠杆...?
In [人生][比之为][杠杆]

[人生] (life) is the main object.

[比] short for [比喻] (metaphorize). It is the verb.

[之] (it) functions as an objective pronoun. In this case, the object is '人生'

[为] (as being) is the auxiliary verb.

[杠杆] (lever) is the relative object, which is the 'metaphor' for ' '人生'


'之为' means 'it as being' here.
&quot;把人生比之为杠杆&quot; = &quot;Take life and metaphorize it as being a lever.&quot;
*Depend on the object, '之' can represent any objective pronoun (that, him, her them, it)
More Example:
&quot;把日本視之为敵人&quot; = &quot;Take Japan and see it as being an enemy&quot;

*You can omit  the objective pronoun '之' in these sentence:
'把人生比为杠杆' ;  '把日本視为敵人'

~

*You can omit 'being' in these sentence:
'metaphorize life as a 'lever' ; 'see Japan as an enemy'