The correct option is B A
Let’s examine the sentence: “When he was walking in the market he was arrested.” The sentence indicates that he was arrested in the activity of his walk in the market. So, instead of ‘when,’ ‘while’ will be used here. "When" should be used to refer to specific time periods or eras; "while" should be used to refer to a particular activity or behavior. So, the correct way to present this sentence is, “While he was walking in the market he was arrested.” Hence, the part that is not be acceptable in standard written English is A. So, Option A is the correct answer.