We theoretically investigate the local density of states (LDOS) probed by an STM tip of ferromagnetic metals hosting a single adatom and a subsurface impurity. We model the system via the two-impurity Anderson Hamiltonian. By using the equation of motion with the relevant Green's functions, we derive analytical expressions for the LDOS of two host types: a surface and a quantum wire. The LDOS reveals Friedel-like oscillations and Fano interference as a function of the STM tip position. These oscillations strongly depend on the host dimension. Interestingly, we find that the spin-dependent Fermi wave numbers of the hosts give rise to spin-polarized quantum beats in the LDOS. Although the LDOS for the metallic surface shows a damped beating pattern, it exhibits the opposite behavior in the quantum wire. Due to this absence of damping, the wire operates as a spatially resolved spin filter with a high efficiency.