Use method based syntax and SelectMany
method instead:
trans.SalesTransactionLines.SelectMany(x => new[] {
new XElement("position",
new XAttribute("x", "40"),
new XAttribute("y", 420")),
new XElement("text",
new XAttribute("lang", "en"),
x.ItemName)
})