A Mixed Finite Element Solver for Liquid-Solid and Liquid-Liquid Impacts