Are the underlined words an infinitive or a prepositional phrase?

James prefers to stay near home and talk to neighbors.









A.
prepositional phrase







B.
infinitive
to neighbors is underlined