"Amos", meaning bearer, was from Judah near Bethlehem. He was a shepherd and dresser of sycamore trees. He was not a prophet by training, but divinely called to deliver the message of Jehovah during the reign of Jero Boam, II when Uzziah was on the throne of Judah. During this time, Judah and Israel enjoyed unusual prosperity. Under these conditions, Amos' predictions were met with skepticism. He was considered an alarmist and a pessimist. However, in less than 40 years, his announcement of the doom of Israel was fulfilled.
In referencing this scripture, who are the two walking together in agreement? Two thieves, two people shacking, two married people, two church members, two unrepentant criminals, two online daters...Any two people. What about thoughts of "walking"? The old testament speaks of three aspects that are pretty similar, yet different:
1. Walking before God, as Abraham was bid to do, which means we are daily eyed by God.
2. Walking with God, as in the case of Enoch, meaning devoted to God. And,
3. Walking after God, meaning to always keep His distant spirit in sight.
And the phrase, "unless they agree to meet"? The root of the Hebrew word for "agree" means to appoint. It may also mean to make an appointment or an appointed place or time. Though everything does not need to be agreed upon, there must be a desire to keep each other's company and they must be going by the same road or same place.
When in the right relationship, you must have knowledge of and be in consistent response to God. Where there is no fellowship with God, there can be no Godly fellowship with the world. God and man cannot walk together unless they be agreed.