It can be water hammer. Water hammer generally occurs when you shut off a quick acting valve. This results into a loud sound like a bang and it is usually because of water’s energy expressing through sound waves instead of flowing. The other thing you are saying is that the sound stops as you turn on your another shower. Then It can say that the quick valve gets slow down, comes back to the older position so it put a stoppage to water hammer.