Zophar speaks of gaining and losing wealth as if it were food that a person eats and vomits. AT: "The wicked person becomes very wealthy, but he loses his wealth like a person who vomits up his food. God causes him to lose it all" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Possible meanings are that "swallows down riches" represents 1) accumulating riches and storing them selfishly. AT: "The wicked man gains much wealth and keeps it all for himself" or 2) accumulating riches in wicked ways. AT: "The wicked man steals many riches" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here "cast them out of his stomach" is a metonym for causing the man to vomit them. This is a metaphor for causing the man to lose his riches. (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-metaphor]])