#"First ,let us find the velocity of second ball for after collision"#
#"Use the conversation of momentum"#
#m_1*v_1+m_2*v_2=m_1*v_1^'+m_2*v_2^'#
#"where;"#
#m_1=3" "kg#
#v_1=4" "m/s#
#m_2=9" "kg#
#v_2=0#
#v_1^'=0#
#v_2^'=?#
#3*4+9*0=3*0+9*v_2^'#
#12+0=0+9*v_2^'#
#12=9v_2^'#
#v_2^'=12/9=4/3" "m/s#
#"Total kinetic energy before collision:"#
#E_B=1/2*m_1*v_1^2+1/2*m_2*v_2^2=1/2(m1*v_1^2+m_2*v_2^2)#
#E_B=1/2(3*4^2+9*0)#
#E_B=1/2(3*16)=24J#
#"Total kinetic energy after collision:"#
#E_A=1/2*m_1*(v_1^')^2+1/2*m_2*(v_2^')^2#
#E_A=0+1/2*9*(4/3)^2#
#E_A=1/2*cancel(9)*16/cancel(9)#
#E_A=8J#
#"The lost kinetic energy:"#
#E_L=E_A-E_B=8-24=-16J#