Attaching Audio source to script variable at runtime

I have two audio sources attached to a game object with various scripts. After a user selects a song, I want to use script A to attach the corresponding audio source to script B’s variable.

So far I have this in Script A but I’m not sure if that is the correct way to do this:

mc.musicSource = gameObject.GetComponent<AudioSource>()"tian_mi_mi");

Thank you for any help!