Two particles \(P\) and \(Q\) of masses \(4m\text{ kg}\) and \(3m\text{ kg}\) respectively are at rest on smooth horizontal ground. \(P\) is projected directly towards \(Q\) with speed \(6.5\text{ m s}^{-1}\). After the particles collide, they move in the same direction and the speeds of \(P\) and \(Q\) are \(2\text{ m s}^{-1}\) and \(v\text{ m s}^{-1}\) respectively.
(a)(i) Show that \(v=6\).
(a)(ii) Given that the energy lost in the collision between \(P\) and \(Q\) is \(45\text{ J}\), find the value of \(m\).
After \(Q\) has moved a distance of \(9\text{ m}\) from the point at which \(P\) and \(Q\) first collided, it hits a vertical wall perpendicular to the direction of motion of \(Q\) and rebounds. The speed of \(Q\) after hitting the wall is \(0.5\text{ m s}^{-1}\).
(b) Find the distance from the wall to the point at which the second collision between \(P\) and \(Q\) occurs.