Both phrases have the same meaning. These similes emphasize the great effort a person should make to understand what is wise. Alternate translation: "if you seek understanding with as much effort as you search for a valuable object" (See: [[rc://en/ta/man/translate/figs-parallelism]] and [[rc://en/ta/man/translate/figs-simile]])
Trying very hard to understand what is wise is spoken of as if understanding were an object for which a person must search. (See: [[rc://en/ta/man/translate/figs-metaphor]])