The car ended up wedged against a tree, trapping the driver inside