One way to approach this problem is to construct, from the DFA A a DFA that is the product of A with a number of similar automata that differ from A only in having a different initial state. In the DFA that is the product of these automata, it is possible to determine whether the input w that A has seen has the property that, if followed by another w, the string ww would be accepted by A. That lets you choose the final states of the product automaton so that it accepts w if and only if w is accepted by A but ww is not.

You may also wish to consult the on-line solution to Exercise 4.2.8 in the text. It is not exactly the same, but some of the ideas from that construction may inspire your solution to Problem 3 of HW2.