This is a bizarre mix of registers. If anything it should be כיצד עשיתי זאת, or הכיצד.
כיצד עשיתי זאת. בלי ה
Well, I suppose it is a he interrogativum, i.e ה"א הַשְּׁאֵלָה. Formal as formal goes.
In what occasion is it used? An apology after doing something wrong? Or not remembering the details of last night party?
Hebrew native speakers are most likely to use איך as an interrogative, and not כיצד.
True, but this is a section on formal language, so they teach the more formal version here even if it is not used much.
"כֵּיצַד עָשִׂיתִי אֶת זֶה?"