Jam with Friend

Hello - I have the Alesis Nitro and my friend plays guitar. I am looking for the simplest and cheapest option for us to play together in headphones. Can I just buy this:

Mackie Mix5 5-Channel Compact Mixer https://a.co/d/3US4J80

And then plug the Nitro into an input and the output from his amp into an input, and then take a Y splitter to the headphones out? And that's it?

Not looking to record, very casual jamming/playing together with a track.

Very appreciative of any thoughts or advce. Thanks!