"Light year" is a distance, not a speed. It's the distance light travels in one year, at the speed of 299,792,458 meters per second.
Explanation:
Below is an attachment containing the solution
A has less energy and lower frequency, while B has greater energy and higher frequency.
Here we can use momentum conservation as in this type of collision there is no external force on it

now here we can say




now here we can say


now by coefficient of restitution
for elastic collision we know that e = 1


now by solving the two equation


also we know that

so final speed of the nail is 6.875 m/s