far from = longe de
close to = perto de
longe (far)
perto (close)
If the de is followed by an o, a (articles) or an ele, ela (pronouns) you must combine (contract) the de with it. For example,
de + a = da » Eu estou longe da cidade. (I'm far from the city.)
de + ele = dele » Nós moramos perto dele. (We live close to him.)