We experimentally study the magnetization dynamics of pairs of micron-sized permalloy squares coupled via their stray fields. The trajectories of the vortex cores in the Landau-domain patterns of the squares are mapped in real space using time-resolved scanning transmission x-ray microscopy. After excitation of one of the vortex cores with a short magnetic-field pulse, the system behaves like coupled harmonic oscillators. The coupling strength depends on the separation between the squares and the configuration of the vortex-core polarizations. Considering the excitation via a rotating in-plane magnetic field, it can be understood that only a weak response of the second vortex core is observed for equal core polarizations.