The "two ships" blocking the exits to Routes 212 and 213 from Pastoria City aren't a puzzle—they're a progression gate.
To pass, you must first earn the Fen Badge by defeating Gym Leader Crasher Wake at the Pastoria City Gym. Once you have the badge, the guards step aside, and both routes become accessible.
Tip: Wake uses Water-types (Gyarados, Quagsire, Floatzel). Bring Electric- and Grass-type moves.