Here's what I'm trying to figure out. By DHS rules, and I know this for sure in ME, not sure about all other states, it is not suitable to live in temporary housing with minor children. That includes hotels, unless of course, you are travelling or it is an emergency. Otherwise, a hotel is not a permanent home, and you are not allowed to live with a child in a temporary home. Exceptions are usually made for domestic violence shelters, or if you can prove that you are taking steps to find a "real" home. I only say this because I have a friend that lost both of her kids to the state of ME, and her only offense was living in a motel room, with herself and both of her kids. There were no other problems, according to the court papers.
I point this out for two reasons: It is possible that Ayla's mother did nothing wrong, except to be deemed homeless with kids, meaning that she didn't necessarily abuse them or neglect them in any traditional sense. The problem usually is that children over a year are not allowed to sleep in the same room with two adults or one adult of a different gender. If Trista had a boyfriend that was staying at a hotel with her and DHS caught wind of that, they would have had grounds to remove Ayla, but not the baby, as no violations would have occurred with regards to the baby. Typically, the state removes all the kids from someone's custody, but not always. Considering the baby's age, and the lack of need for privacy, they might not have considered it a problem for the baby to be in a hotel.
ETA AGAIN: If the grandmother is also living in a hotel, I see no way that the grandmother would be allowed to keep the baby either. Unless grandma is very close to having her own home, or the state allowed it because grandma is very unlikely to have boyfriends coming through the motel to see her.
ETA: It depends on the reunification plan. If the genuine plan is to return one child ASAP, then the state often will allow the parent to keep the other child if there are no signs of abuse in regards to that child.