You can certainly find out an internal endpoint of a worker role instance from a web role instance using code. See this thread for more details: How to get web role input endpoint in worker role?.
However I see one problem with your approach. You mentioned that web role will communicate with worker role using an internal endpoint to send the data and then wait for worker role to process that data and send the response back. While technically its possible to do so, it would cause some scalability issues because you're now tying up your web role. Furthermore, you have to decide in your code which worker role instance should process the data (assuming there're more than one instances).
My recommendation would be to get the request and persist the request data in blob storage. You will get a URL of the blob. Then write a message in a queue with the URL of the blob. Once the message is written to the queue, your web role can notify the user that the request has been submitted. Worker role instances would poll this queue periodically and work on the message. They will get the blob URL from message contents, fetch the contents and work on it. Once the work is processed, worker role could write to a queue/table indicating that the work is completed. Web role could constantly poll this table or queue and once the task is completed it can notify the user.