I am a remote software developer involved with 3 companies:

Company A sign my papers, pay me every month and sell my hours to Company B.

Company B gives me equipment, an office and his important name in the industry and sell my hours to Company C.

Company C is where I really perform my tasks, have a team, manager, etc.

Company C seems to like my work and already told that to Company B, but the company that really pays me is Company A.

Which company should I approach to get a raise? And how? I don't think most arguments would work in the situation because the company that can rate my work (Company C) is not same one paying me (Company A) and there is Company B between them.

The common way for other people in the same situation was Company B hiring you from Company A.

Edit: I applied to work for Company B and interviewed only with Company B and C. Company A was introduced as a partner by Company B after Company C approved my hiring.

Once I asked a raise for Company A, they forwarded my request to Company B and it was Company B that gave me the response that it was easier for them to hire me than approving a raise.