Answer:
on land but close to oceans
Step-by-step explanation:
A boundary between an oceanic plate and a continental plate will be near a coastline., not "far from the coast" or "in the middle of oceans."
Often, mountains are also near that boundary, but mountains may also exist elsewhere, so "anywhere there are mountains" is not an apt description.
The best choice is "on land but close to oceans."
_____
Additional comment
The 2011 Tohoku earthquake near Japan was offshore by 67 km. It came from the subduction zone where the Pacific plate dives beneath the Eurasian plate. It is an example of a plate boundary quake that occurred offshore, rather than on land.