A teenager was driving a high-powered BMW at speeds over 140mph when he slammed into the back of a taxi causing catastrophic injuries to the driver, a court has heard.