What's the best way to get two people, traveling without a car, from Cracow to Eger over the course of a single day?
For that sort of head-scratching question, I start with Rome2Rio.com. Unfortunately, I've found that you cannot trust that website's travel times, bus or train frequencies, or fares, but it can be useful in pointing out what modes of transportation you may need to use and places where you might logically change from one to the other.
Obviously, the winner here is a rental car, but as you may already know, it would probably cost you many hundreds of euros in extra fees if you picked up a car in Poland and dropped it in Hungary. Besides which, you seem not to be interested in driving.
I'd check skyscanner to see whether Rome2Rio's correct about the existence of a 1-hour flight between Krakow and Budapest, then I'd wait for James E to see this thread and see what he says about the real-world time probably needed to get from the Budapest airport to Keleti Station by taxi. Then I'd check the train schedule for Eger and see how it lines up with the flight arrival time(s) on skyscanner. A quick look on the Deutsche Bahn website suggests that trains are frequent and take only 2 hours. That information should be checked on the Hungarian rail website, because last summer there was construction on at least one of the rail lines leading to adjusted schedules that were not reflected on the DB website.
Though not a fan of mixed-mode trips like this, I might well opt for the air+train combo here unless I could some up with a place I'd like to see on the way that would justify two half-days on trains or buses.
Well, I did find a short direct flight from Cracow to Budapest, so taking that, and then a train to Eger, is certainly a viable option.
It also seems like a second option (involving more travel time) would be to take a bus to Kosice, and then a train to Eger.