It's not right to make fun of old people.

Literal

Old-people [object-を] tease [nominalizer-の] [topic-は] not-good.

~のはよくない ('doing X is not good') is a basic judgment pattern. からかう ('to tease, make fun of'). The nominalized clause serves as the topic being judged.