A Lie systems approach for the first passage-time of piecewise deterministic processes