The jury has been told about a letter written by the boy after the alleged fatal attack