Both spellings are acceptable (and they are pronounced identically). According to Swan, some people find the d -spelling with did incorrect. If you wish to be formally correct, I suggest you use What used he to do?
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.