Two Astronauts A and B are working in the space shuttle in the space.Suddenly the hammer falls from the hands of astranaut in space. who will hear most sound,Astranonaut A or B .and why?

Are they both inside the shuttle, where there is an atmosphere? Is one of them outside "in space"? Dropping a hammer will not make it fall, in either case.

You have not adequately defined the locations of the two astronauts.

Sound cannot be heard in space. If a hammer hits the spacecraft, it can be heard by people inside, where there is an atmosphere to propagate sound. Sound can also travel through the walls of the spacecraft if a wall is hit by an object.