A is correct, speaking about life expectancy. I can't think of a meaning for which B would not be awkward as is... you could use a similar syntax with a qualifier, "They have lived in New York for 18 months," "They have lived together for 18 months," thought if it were an ongoing action, "They have been living..." would be more idiomatic. And if it's not ongoing, "They lived..."
Ok, can someone explain this to me. In the previous exercise, I lost a heart for missing the 'per' in 'corriamo per tredici minuti' (can't remember the exact numeral, but you get the idea), but here it's missing in the default translation (vivono diciotto mesi). Why is that? Why can I not say 'corriamo tredici minuti'?