Respuesta :

 It reacts to the motion. If the mass hanging from the pulley was overwhelmingly heavier than the mass on the ramp, it'll obviously pull the ramp mass up and thus friction would be trying to oppose this and vice versa.