Car was hooning moments before crash that killed Libby, court hears