Spiritomb is a Dark/Ghost type. Dark is weak to Fighting but Ghost is immune to Fighting type moves, not resistant, like Psychic types.
Since your Kangaskhan has Scrappy it can hit Ghost types with Normal and Fighting moves, so in this case it hits Spiritomb, ignoring its immunity and dealing super-effective damage. If it was, e.g. Gengar, Rock Smash would only deal half the damage, because Poison resists Fighting.
>Scrappy enables Normal & Fighting-type moves to hit Ghost-type Pokémon.
Other than the added Fighting weakness, Spiritomb's weaknesses stay the same, so Bug would still deal neutral damage.
Scrappy basically disregards a Ghost-type Pokemon's immunities.