We here report the structural, magnetic and electrical properties of Sr2.9La0.1Sn1.9M0.1O7 (M= Cr, Mn or Fe) compounds. This La/M codoping of the hybrid improper ferroelectric Sr3Sn2O7, allows introducing magnetic cations into the perovskite layers of this Ruddlesden-Popper phase. The doping induces minor structural changes, preserving the polar structure with space group A21am of the undoped compound. The perovskite tolerance factor of all doped samples is slightly lower than in Sr3Sn2O7, which preserves the tilts and rotations of SnO6 octahedra. Doped samples exhibit a paramagnetic behavior down to 5 K and obey the Curie-Weiss law above 200 K. The effective paramagnetic moments agree with the expected spin-only values of the respective magnetic M3+ cations. All samples show a ferroelectric hysteresis loop at room temperature, but the doped samples show larger coercive fields. Additionally, the doping with magnetic cations has important effects on the dielectric properties: a strong decrease of the temperature of the ferroelectric transition together with a smoothing of the anomaly in the dielectric permittivity. These results suggest that the disorder produced by the two aliovalent substitutions is detrimental for the ferroelectric properties due to point charge defects but, at the same time, the prevalence of the structural distortion (tilts and rotations) preserves the ferroelectricity in the investigated doping regime.