By means of inelastic neutron scattering, we measured magnetic excitations in a sizable single crystal of La1.7Sr0.3Cu0.95Al0.05O4, which is an Al-substituted system of the heavily hole-doped cuprate system La2-xSrxCuO4 (LSCO) with an effective concentration of holes of xeff = 0.25. At incommensurate positions Qort = (1+δ, ±δ)/(1-δ, ±δ) around the magnetic Γ point QM = (1, 0), magnetic correlations were induced, and the incommensurability δ was 0.139 (r.l.u), which is in contrast with the δ of 0.125 (r.l.u) for LSCO x = 0.25, suggesting that the Al substitution caused an increase in δ. We also observed the same effect in the Fe-substituted system La1.7Sr0.3Cu0.95Fe0.05O4 (δ = 0.144). In addition to the obvious effect on the IC excitations, we observed continuum magnetic excitation with a ring-like shape in a two-dimmensional momentum space around QM = (1, 0). This was also observed in the Fe-substituted system, meaning that the induction/enhancement of the magnetic correlations originates from the impurity substitution, regardless of whether the impurities have magnetism. Considering our recent experimental results, revealing that the ring-like excitation also evolves in impurity-free LSCO x = 0.25 with increasing temperature, these facts suggest an intimate relationship between the temperature change and impurity substitution on the magnetic correlations and may present clues for investigating the magnetic correlations through an effective approach using impurities.