I’m not in any position to give financial advice, but I can offer my personal opinion!
When it comes to lending friends money or resources (i.e. temporary living arrangements), lend as much as you’re willing to give away or do without.
If you think in two months when your friend can’t repay you the $300 you’ve loaned him, that you will experience any negative emotions or stress related to this transaction, don’t do it. Same goes if he needs 10 bucks for lunch, if you don’t think he will repay or offer to pick up your lunch another time, just say no. He needs a place to stay while he gets back on his feet, but 2 weeks turns into 6 weeks of him eating your groceries, loafing around while you’re hard at work and cleaning up after him, don’t do it if you’re not feeling that generous.