A more general principle in computer programming:
Don't try to build and optimize something in the same time. Most of the time you will get lost in the process and eventually become frustrated and give back.
A second rule is to break a bigger problem into subproblems that can be solved more easily, then combine the solutions to solve the bigger problem. Important note: This is not always the case. Sometimes, it might be harder than you think to combine the solutions. In this case, it is not.
So what you really need?
a. A $DFA$ that recognizes only $aa$.
b. A $DFA$ that recognizes only $aaa$.
c. Combine the solutions of a and b to create a $DFA$ that recognizes $aa$ $OR$ $aaa$ (not how the sentence mentions "and" but I used $OR$. Why is that? Because of the negation of "except". "Except aa and aaa" translates to "exclude the words aa or aaa".)
d. Switch the reject and accept of the last automaton. So you have $NOT$ ($aa$ $OR$ $aaa$). The reject states are those where the automaton would be "trapped" (if you are missing those, make sure you use every symbol in every state, most of the times those are omitted but are useful for learning how DFAs work.
Basically, $NOT$ ($aa$ $OR$ $aaa$) is the regular expression that describes the language you want. You may already know that for every regular expression there is a DFA that recognizes it and vice versa. After working with a few examples, you should be able to empirically detect regular languages for exercises. There are of course examples that are trickier than this one.
Once you have obtained a regular expression, there are known techniques and algorithms that allow you to create first a non-deterministic automaton , convert the NDFA to a DFA and last but not least, optimize the DFA so the least number of states needed is used. I guess that you don't know about these yet, but they are very helpful. If you are following a course on automata, they will come up soon enough, so no worries. Otherwise, I guess you would have to check lecture notes or wikipedia.