Another interpretation: you must examine your brother [to determine] whether he is a swindler, and so on. "And you shall return it to him" — a find that works and feeds itself, and not a find that involves loss. [Bracketed plain-sense gloss: an animal that earns its keep by laboring and grazing may be held and returned in due course, but an object whose safekeeping only drains the finder's resources need not be retained at the finder's expense.]
Investigating the Claimant and the Cost of Keeping a Find
Yalkut Shimoni on Torah 352:8
דָּבָר אַחֵר, אַתָּה צָרִיךְ לִבְדֹּק אָחִיךָ אִם רַמַּאי הוּא וְכוּ'. "וַהֲשֵׁבֹתוֹ לוֹ", מְצִיאָה שֶׁהִיא עוֹשָׂה וְאוֹכֶלֶת, וְלֹא מְצִיאָה שֶׁיֵּשׁ עִמָּהּ הֶפְסֵד.