"using the equation (1)"
5*12+9*0=5*u_1+9*u_2
60+0=5*u_1+9*u_2
60=5*u_1+9*u_2" (a)"
"using the equation (3)"
12+u_1=0+u_2
u_2=12+u_1 " (b)"
"now use (a)"
60=5*u_1+9*(12+u_1)
60=5*u_1+108+9*u_1
60-108=14*u_1
-48=14*u_1
u_1=-48/14=-24/7 m/s
"finally ;use (b)"
u_2=12-24/7
u_2=(84-24)/7
u_2=60/7" "m/s
"testing"
"The Total Kinetic Energy before collision:"
E_b=1/2*5*12^2+0
E_b=72*5=360J
"The Total Kinetic Energy after collision:"
E_a=1/2*5*(-24/7)^2+1/2*9*(60/7)^2
E_a=(5*576)/(2*49)+(9*3600)/(2*49)
E_a=(2880+32400)/98
E_a=35280/98
E_a=360J
color(green)(E_b=E_a)