مَرَرْتُ بِرَجُلٍ أَبُوهُ عَالِمٌ — I passed by a man whose father is learned.
مَرَرْتُ: past verb with subject tāʾ.
بِرَجُلٍ: preposition plus genitive indefinite noun.
أَبُوهُ: nominative mubtadaʾ by wāw; -hu links to the man.
عَالِمٌ: nominative predicate.
أَبُوهُ عَالِمٌ: the whole nominal sentence is an adjective in the genitive position of rajulin.
The words inside the clause keep their own cases; it is the clause’s position that is genitive.