As Ms Musa and Mrs Marandran were sitting in the park, one of Bain or Kennedy, 28, uttered racist phrases towards them, including "f****** black African" and "f****** brings you to this country?"
The incident was captured on CCTV which was shown to the court, while the camera operator alerted police to the attack on September 3, 2012.
Sheriff Kenneth Mitchell sentenced Bain to two years and eight months in detention, while Kennedy was earlier jailed for two years and six days.
Bain, who was 15 at the time of the attack, and Kennedy pled guilty to racially assaulting 41-year-old Ms Musa to her injury. Kennedy also admitted resisting arrest and claiming she had an infection before spitting on a police officer. Bain pled guilty to the racially aggravated assault on Mrs Marandran, 40, by repeatedly punching her on the head and pushing her to her injury.
Fiscal depute Mark Allan, prosecuting, said: "The second named accused, Bain, repeatedly punched the then pregnant Mrs Marandran on her head and pushed her." He told the court that both accused demanded Ms Musa's mobile phone and tried to grab it off her after she told them she was going to phone the police.
Mr Allan said she was punched on the head which caused her to fall to the ground. He added: "Once on the ground, she was repeatedly punched on her head and body, her hijab or headscarf as she can be seen wearing during the course of this incident was pulled from her head and she was robbed of her mobile telephone. Police officers were directed to the scene by those operating the CCTV."
Both Mrs Marandran and Ms Musa were taken to Glasgow Royal Infirmary for treatment after the attack. Ms Musa had a bruised left cheek which was tender and swollen, a grazed knee and a sore neck. Mrs Marandran suffered no damage to her unborn baby but experienced muscular pain.