Let `m_1, m_2` be the masses of two bodies. Since these bodies have equal heat capacities, so `m_1s_1 = m_2s_2 or m_2= m_1 s_1//s_2`
Let s be the specific heat of composite body. Then
`(m_1 + m_2)s = m_1s_1 + m_2 s_2 = m_1 s_1 + m_1s_1`
`=2m_1 s_1`
or `s =(2m_1s_1)/((m_1+m_2)) = (2m_1s_1)/(m_1 + (m_1s_1//s_2))= (2s_1s_2)/(s_2 + s_1)`