Normally you solve an elastic collision with just momentum and energy conservation, because you really don't know what happens at impact. The formulas are given in this answerin this answer. For equal masses in one dimension the velocities are exchanged.
It turns out your interaction time and acceleration multiply to get the correct velocity change, but since you didn't insist on momentum and energy conservation it might not. When you calculated the acceleration as $\frac {mv}t$, you assumed that the first rock would stop. That is correct here, but if the second rock had a different mass your calculation would look just the same.