Thirty-eight people were injured, six of them hospitalized, after a United Airlines flight from Nigeria to Washington, D.C., experienced problems midair, Nigerian officials said.