TBH, I don't think it was premeditated. That doesn't excuse anything, of course.
Dylan was very unhappy at being forced to visit him and didn't want to go, except perhaps to spend some time with his friends in town. He was tired and perhaps grouchy from the flight, and moody as a teenager. Mark was angry, embarrassed, and frustrated at both Elaine and Dylan. Mark "won" by getting the visit awarded to him, which was largely what the visit was about - "winning" over Elaine.
Then there were several points of contention immediately after Dylan's arrival ("I wanted to go to a nice sit-down dinner, he wanted to go to McDonalds" Mark said). Dylan was a young teenager now and aside from his anger/frustration over the visitation and diaper photo discovery, he was more emotional, confident, and not afraid to speak up. I think Dylan and Mark had a verbal confrontation in the home that evening and Mark reacted violently by hitting him or throwing something at him.
One scary thought is that there's a chance Mark didn't kill him with the initial hit/throw. If Mark had just injured him (leaving a cut, bruise, concussion, eye injury, etc. that needed medical care) and the family/attorneys/court found out, he would lose custody, and more importantly to him, "lose" to Elaine. So did he decide to take the next step and finish him off? It's hard to imagine, but then again, look who we're talking about...