This is the end of a quotation within a quotation that begins with the words "secretly entices you and says, 'Let us go and worship ... neither you nor your ancestors—" in verse 6. It can be translated as an indirect quotation. "secretly entices you and says that you should go and worship ... neither you nor your ancestors—any of the gods of the peoples ... other end of the earth." (See: [[rc://en/ta/man/translate/figs-quotations]])
Here the reference to the two extremes of the earth means "everywhere on earth." Alternate translation: "throughout the entire earth" (See: [[rc://en/ta/man/translate/figs-merism]])