Use REQUEST variable as dynamic upload location
That field accepts any valid Twig code, so something like this should work:

challenges/{{ craft.request.getPost('challenge_id') }}/


Fair warning, though... I'd also be wary of accepting untrusted front-end input like this that ends up on the file system.