I should place my X at position (2,2) to complete a diagonal line from (0,0) through (1,1) to (2,2). This will give me three Xs in a row diagonally, which is an immediate win. The opponent has no immediate threat of winning, so I don't need to play defensively. Taking the win is clearly the optimal move in this position.