View showing a list of tagged nodes related to term reference field Drupal 7

Taxonomy vocabulary = Company activity (Activity 1, Activity 2, Activity 3 ….). This vocabulary has an OG group field.

Content type 1 = Company with an entity (terms) reference field showing the list of the terms of the activity vocabulary. The widget is “radio button box” and the administrator of the Company, during the creation of the content, may tag and save the appropriate activities performed. This content type has an OG group field.
Example: Company 1 --> tag Activity 1 and Activity 2 – Company 2 --> tag Activity 1 and Activity 3

Content type 2 = Request of Service. Any Company can create a new request of service and first of all choose the needed activity in a entity (terms) reference field (fiel_tipologia_macchina) showing the list of the terms of the activity vocabulary. The widget is “selection list” – only one choice. This content type has an OG group audience field.

Now the question: In Content type 2 (request of service) I need to add a field that show the Company qualified to perform the requested service.
Example: the service requested is “Activity 1” --> show Company 1 and Company 2. 

The field has to be a radio button box so the author of the request can choose the company to send the request (one or more company).

I think that I have to use a view (page or block) but I am not able to find the right relation and contextual filters (entity reference or OG).

Thank you in advance for help.
I have accomplished something along the lines of what you describe with a combination of a hook_form_alter and some Javascript. The following should help you set up something that will interactively enable/disable possible company choices based on the selected activity. Take note that it really only works if those inputs are selects and not Drupal's default autocompletes.

In a hook_form_alter directed at the "Request" node and node edit forms, create a simple of array of arrays, where the key is the term IDs of the activity, and the subarrays are the node IDs of the companies. Here is some pseudo-code, since I don't the actual structures of your entities:

$nested_array = [];

$term_query = \Drupal::entityTypeManager()-&gt;getStorage('taxonomy_term')-&gt;getQuery();
$term_ids = $term_query-&gt;condition('vid', 'activity')-&gt;execute();

foreach($term_ids as $term_id) {
    $node_query = \Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;getQuery();
    $node_ids = $term_query
      -&gt;condition('type', 'company')
      -&gt;condition('field_ref_activity', $term_id, 'IN')
      -&gt;execute();

    $nested_array[$term_id] = $node_ids;
 }

 $form['#attached']['drupalSettings']['company_activities'] = $nested_array;
 $form['#attached']['libraries'][] = 'my_module/my_module.library_name';


The above makes the nested arrays available to the front end for on-the-fly manipulation. Create a library for your module with this jQuery-based Javascript. Again, pseudocode which you'll have to modify to your form structure:

function limitCompanySelection(selected_activity) {
    let allowed_companies = drupalSettings.company_activities[selected_activity.val()];

    $('company-input-selector option').each(function(){
        if ($.InArray($(this).val(), allowed_companies)) {
            $(this).prop('disabled', false);
        }
        else {
            $(this).prop('disabled', true);
        }
    });
}


Set the above function to run on initial load and every time the selected activity is changed, finding the selected activity and passing it into the function.