plz help me with this math and also explain

Step-by-step explanation:
[tex]\longrightarrow \tt { SI = \dfrac{PRT}{100} } \\ [/tex]
[tex]\longrightarrow \tt { 250 = \dfrac{P \times 12\cfrac{1}{2} \times 4}{100} } \\ [/tex]
[tex]\longrightarrow \tt { 250 = \dfrac{P \times \cfrac{25}{2} \times 4}{100} } \\ [/tex]
[tex]\longrightarrow \tt { 250 = \dfrac{P \times 25 \times 2}{100} } \\ [/tex]
[tex]\longrightarrow \tt { 250 = \dfrac{P \times 50}{100} } \\ [/tex]
[tex]\longrightarrow \tt { 250 \times 100 = P \times 50} \\ [/tex]
[tex]\longrightarrow \tt { 25000 = P \times 50} \\ [/tex]
[tex]\longrightarrow \tt { \dfrac{25000}{50} = P } \\ [/tex]
[tex]\longrightarrow \underline{\boxed{ \green{ \tt { \$ \; 500 = P }}}} \\ [/tex]
Therefore principal is $500.
Let the total number of balls be x.
→ Red balls + Blue balls + Yellow balls = Total number of balls
[tex]\longrightarrow \tt{ \dfrac{2}{7}x + \dfrac{3}{5}x + 36 = x} \\ [/tex]
[tex]\longrightarrow \tt{ \dfrac{10x + 21x + 1260}{35} = x} \\ [/tex]
[tex]\longrightarrow \tt{ \dfrac{31x + 1260}{35} = x} \\ [/tex]
[tex]\longrightarrow \tt{ 31x + 1260= 35x} \\ [/tex]
[tex]\longrightarrow \tt{ 1260= 35x-31x} \\ [/tex]
[tex]\longrightarrow \tt{ 1260= 4x} \\ [/tex]
[tex]\longrightarrow \tt{ \dfrac{1260 }{4}= x} \\ [/tex]
[tex]\longrightarrow \underline{\boxed{ \tt { 315 = x }}} \\ [/tex]
Total number of balls is 315.
A/Q,
3/5 of the balls are blue.
[tex]\longrightarrow \tt{ Balls_{(Blue)} =\dfrac{3 }{5}x} \\ [/tex]
[tex]\longrightarrow \tt{ Balls_{(Blue)} =\dfrac{3 }{5}(315)} \\ [/tex]
[tex]\longrightarrow \tt{ Balls_{(Blue)} = 3(63)} \\ [/tex]
[tex]\longrightarrow \underline{\boxed{ \green {\tt { Balls_{(Blue)} = 189 }}}} \\ [/tex]