view with nested relationships
It sounds like you're starting with node type B, whereas you should be starting with node type C.


Create your view with appropriate filters so that you only see nodes of type C
Add a "Entity Reference: Referencing entity" (not "Referenced entity) relationship for the B->C entity reference field, give it an identifier of something like "Entity B", tick "Require this relationship
Add another "Entity Reference: Referencing entity" relationship for the A->B entity reference field, use relationship "Entity B", give it an identifier of "Entity A", tick "Require this relationship
Add a filter (a regular filter, not a contextual one) requiring that your field has a value of "4", use relationship "Entity A"