Sharma got the information that the woman's husband was coming to Pandit Nehru bus station here late last night.
He then went there with an intention to allegedly eliminate him.
At the bus stop, Sharma went to a toilet where his country made rifle allegedly misfired, injuring a bus passenger who was going to Rajahmundry.
Police said the injured person was not the one whom Sharma was looking for.
Later, Sharma and his two friends were detained, police said, adding that their interrogation was on.