Job is saying that the beasts, the birds, the earth, and the fish understand God better than Job's friends do. (See: [[rc://en/ta/man/translate/figs-irony]])
The command in the first part of the sentence can be translated as a condition. Alternate translation: "Or if you speak to the earth, it will teach you" (See: [[rc://en/ta/man/translate/figs-imperative]])
The command "Ask the fish of the sea" is understood from the previous sentences. It can be translated as a condition. Alternate translation: "and if you ask the fish of the sea, they will declare to you" (See: [[rc://en/ta/man/translate/figs-ellipsis]] and [[rc://en/ta/man/translate/figs-imperative]])