OpenAI has picked two law firms, Cooley and Wachtell Lipton Rosen & Katz, to prepare for an initial public offering that could come as soon as this year, according to people familiar with the matter.