Upvote:3
A taxi, particularly if you have luggage. It might take longer than the metro because Mexico city is often congested but you, your child and luggage will get all delivered point-to-point.
The metro is definitely cheaper though and there are children using it all the time. Any bags that you take from the airport station into the metro will get inspected though and cannot be too large or it will be quite cumbersome to go through the turning gates. You may also need to get transportation from the exit metro station to exactly where you are going.