投缘 and 合得来 are interchangeable and they both mean: hit if off, get along well, be on good terms, be friends, be friendly, be compatible, relate well to each other, etc.
The two of them hit it off as soon as they met.
He hit it off with John and soon the two of them run a business together.
The two didn’t get along in the past, but now they hit it off well.
He mixes well in any company.
You sure seem to get along well with the new neighbors.