Step 1: Determine the number of students after shifting. Let the initial number of students in the morning and afternoon shifts be in the ratio \(13 : 9\). Hence, we take \[ M = 13x \quad \text{and} \quad A = 9x. \] After 21 students are transferred from the morning shift to the afternoon shift, the numbers become \[ M' = 13x - 21 \quad \text{and} \quad A' = 9x + 21. \] The new ratio is given as \(19 : 14\), so \[ \frac{13x - 21}{9x + 21} = \frac{19}{14}. \] Cross-multiplying, \[ 14(13x - 21) = 19(9x + 21), \] \[ 182x - 294 = 171x + 399, \] \[ 11x = 693 \Rightarrow x = 63. \] Thus, the number of students after the transfer is \[ M' = 13 \times 63 - 21 = 798, \] \[ A' = 9 \times 63 + 21 = 588. \] Step 2: Account for the new admissions. Let the number of new students admitted to the morning and afternoon shifts be in the ratio \(3 : 8\). Assume \[ \text{New morning} = 3y \quad \text{and} \quad \text{New afternoon} = 8y. \] The final number of students in each shift is then \[ M_f = 798 + 3y \quad \text{and} \quad A_f = 588 + 8y. \] Given that the final ratio is \(5 : 4\), \[ \frac{798 + 3y}{588 + 8y} = \frac{5}{4}. \] Cross-multiplying, \[ 4(798 + 3y) = 5(588 + 8y), \] \[ 3192 + 12y = 2940 + 40y, \] \[ 252 = 28y \Rightarrow y = 9. \] Step 3: Find the total number of new students. The total number of newly admitted students is \[ 3y + 8y = 11y = 11 \times 9 = 99. \] Hence, the number of new students who joined the school is \(99\).