This problem is very similar to the classic case of Bernoulli trials, except that it's not clear whether a male or a female newt corresponds to success. The trick is that the first newt to be born determines which is which. Call the gender of the first newt G. Then the wizard will keep breeding newts, starting with newt 2, until a newt is born of gender Not-G. Once newt 1 is fixed, starting with newt 2, the situation is a classic case of Bernoulli trials.
Let X be a random variable representing the number of newts AFTER newt 1 until a newt of the opposite gender is born. X must be a geometric random variable with parameter $1/2$. This has the expectation $1/P(success) = 2$ (check wikipedia if you forget this). The total number of newts is this plus one more for the first newt:
$$E[\text{number of newts}] = 1 + E[X] = 3$$