State police and prison officials are trying to find out how a two-shot, .22-caliber derringer pistol got into a dormitory barracks shared by 50 prison inmates. The gun was discovered about yesterday morning at the prison system`s Cummins Unit, as guards searched the barracks where inmates designated as trusties live. Prison spokeswoman Dina Tyler said the search was begun after an inmate in the barracks complained of shoulder pain, and said he thought he had been shot. Doctors later found that a bullet in his shoulder was from an old wound, and Tyler said guards on duty Wednesday night said they heard no shots. The gun was found inside a work glove, under the bed of another trusty in the barracks where the complaining inmate lived.