2 If they do not live near you or if you do not know who owns it, take it home with you and keep it until they come looking for it. Then give it back.

Read Deuteronomy 22:2 Using Other Translations

And if thy brother be not nigh unto thee, or if thou know him not, then thou shalt bring it unto thine own house, and it shall be with thee until thy brother seek after it, and thou shalt restore it to him again.
And if he does not live near you and you do not know who he is, you shall bring it home to your house, and it shall stay with you until your brother seeks it. Then you shall restore it to him.
If its owner does not live nearby or you don’t know who the owner is, take it to your place and keep it until the owner comes looking for it. Then you must return it.