A neighbour of a father who is believed to have killed his two sons before taking his own life has described the harrowing screams of the two children on the night they are thought to have died.

The woman told an inquest she heard the older of Graham Anderson's children, 11-year-old Jack, screaming: "What are you doing to me?" The younger boy, Bryn, three, could also be heard frightened and crying.

Anderson and his children were later found dead at their flat in Tidworth, Wiltshire, by a tenant who had been due to move in because they were being evicted.

The inquest was told that Anderson, 36, was stressed at an impending custody battle with the mother of the boys, Victoria Jones. He had been released from prison 10 months before the tragedy after serving a sentence for assaulting a man he believed was having a relationship with Jones.

At the start of the inquest in Salisbury, coroner David Ridley said he would look at the role doctors, social workers and other professionals had played prior to the deaths of the two boys and whether lessons could be learned.

Neighbour Sarah Dodman described being woken by banging and screaming in the early hours of 30 August last year. "I heard the older of the two boys cry and the little boy also began to cry loudly and sounded scared," she said.

"I heard little bangs on the wall which sounded like the older boy was flailing about – he was screaming. The little boy, who was scared, was crying – this was frightened screaming. I then heard the murmuring of a deep voice. At that time the little one was just screaming, screaming and screaming."