A teenager who stabbed a fellow student in a premeditated attack at Carine Senior High School in Perth is sentenced to two years and seven months in juvenile detention.