Caroline Kayll was killed after her ex threatened to expose her relationship with a boy, a jury hears.