Did you mean Invite my friend to Krakow?
No, I mean invite him to Warsaw. He could come to Warsaw on the Thursday evening, share your hotel room Thursday night and then get a train home Friday afternoon/evening about the same time that you go to Krakow.
Could i fly from Warsaw to Krakow? Probably more expensive but wouldn't it be quicker?
You could but it isn't much quicker (maybe 30 minutes quicker, at the most); however, it is more expensive and a lot more hassle. I'd certainly take the train, even if I wasn't paying.