Biz, onun bu iş için doğru adam olduğunu keşfettik.

what is the function of “olduğunu”? and the best translation?

English Translation

We’ve found him to be the right man for the job.

Turkish is a bit funky with it’s grammar so word-for-word translation is nearly impossible to do.
In this context, “olduğunu” means “that he is”. When you add the suffix -dik to a stem, it forms a relative clause (that). Then you just have to adjust based on the pronoun.
So “olduğunu” is ol (from olmak) + -duk + (n)u (because of the third person singular ‘onun’). The ‘k’ becomes ‘ğ’ because of the vowel that follows and ‘n’ is added because two vowels cannot follow one another.
I hope that this is clear!