Your problem is that Descendents and Where return an IEnumerable not a single XElement which is what you're after. You can fix this like this:
XElement toEdit = doc.Descendants("ArrayOfCustomer")
.Descendants("Customer")
.Where(x => Guid.Parse(x.Descendants("CustomerId").Single().Value) == customer.CustomerId)
.FirstOrDefault();