I’d suggest going second hand! You could pick up something pretty decent at that price on ebay with a bit of patience!
If he gets a new bike at that price, it’ll be OK but not great, however if he gets into it and wants to upgrade, or doesnt get into it and want to sell, a used bike of that price isn’t going to sell for much.
On the other hand, my friend recently got a cannondale off ebay, USA made frame, OK its a good few years old but its full XTR, hope hubs, etc etc… £400. He rode it for a bit and decided the frame was too long, so now its going back on sale and he’ll probably get his money back for it. Can take a while finding the right deal, but its going to be the best way of getting bang for buck IMO and a decent % back if you sell it in the future. You could argue the plus side of a new bike is you get a warranty with it, but if its mainly for offroad, the stuff thats likely to get broken probably wont be warranty anyway.