The old man asked me a favor.

Literal

Old-man [topic-は] me [to-に] request-thing [object-を] did.

頼み事 ('a favor, a request') is a compound noun: 頼み (request) + 事 (matter). に marks the person asked. Simple and clean.