Coding in header vs separate cpp

The code you posted, whether in the header file or the source file, makes little sense.

Why are you creating a new instance of software serial every time the function gets called? It would make sense to create ONE instance, when the class gets instantiated, not every time the method gets called.

You still haven't explained why you are doing software serial on the hardware serial pins.