Such things happened in the lives of many people. Even to find the source of which many people put forward different opinions. But i am limited to the following two issues.
1. By her luck
2. By her hard working
I got confused also by what OP really meant re: who really got luck here?
First, the one you asked, is he or she?
If you known about someone when he was poor many years ago and now he is already rich, maybe he achieved it by his hardworking. If it less than a year or even months, you can say maybe he was lucky enough to win from lottery/gambling
Is the OP referring to the "poor man getting becoming rich suddenly," getting lucky because of "1. By her luck" (therefore she inherits something and he just happened to be associated with her)?
And/or is the OP referring to the "poor man becoming rich suddenly," simply because "2. By her hard working" work ethic instead (therefore implying that she basically does all the work and he just happened to be associated with her)?