رَأَيْتُ أُولِي مَالٍ.
Translation: I saw people of wealth.
رَأَيْتُ: past verb with first-person subject tāʾ; أُولِي: accusative object with yāʾ, and muḍāf; مَالٍ: genitive complement with kasra.
مَرَرْتُ بِأُولِي مَالٍ.
Translation: I passed by people of wealth.
مَرَرْتُ: verb and subject tāʾ; بِ: preposition; أُولِي: genitive with yāʾ, and muḍāf; مَالٍ: genitive complement.
Distinguish: The first «أُولِي» is accusative and the second genitive although the form is identical.