1)
Why does the Torah need to mention "those who are near and those who are far"?
1.
Rashi: As if to say that from the gods who are near, 1 of whose worthlessness you are aware, you can be sure that those that are distant - are equally worthless. 2
2.
Seforno: To teach us that, despite the fact that those that are near you won't worship anyway - since you know them to be false; and those that are far you won't worship either, since they are too far to reach (Nevertheless, the Meisis is sentenced to death for enticing - PF).
2)
What is "mi'Ketzei ha'Aretz ve'ad K'tzei ha'Aretz" referring to?