Well, it's not really luck. It's exactly because there's cctv in enough places that they were able to get his photo from the one moment he lowered his mask at the hostel, but even more significantly that they were able to piece together his movements enough to be able to suspect that the guy at the hostel was the same one that carried out the shooting. Then it was a matter of distributing the photo and hope someone recognizes him. And offering the reward ofc. Very simple but not luck.
It still came to down to a crappy photo from a security cam and not the drones, internet surveillance, or facial recognition software in constant use against us.
This crime could have been solved the exact same way in the 1980s. The only difference being that the guy's picture would have been distributed over the 6 o'clock news instead of the internet.
Not only were security cameras not as prevalent as they are now, they had terrible video quality. We'd have an extremely grainy grey photo of a face. Not enough to visually recognise him later.