Let me first address the withholding tax issue from US Corp B to Netherlands Corp A. Anytime a US entity makes a payment to a foreign entity, it is generally required under US Internal Revenue Code Sections 1441 and 1442 to withhold US income taxes at a 30% rate, absent a treaty provision allowing a lower rate or allowing no withholding. Prior to making payment, the US company must obtain documentation from the foreign entity to substantiate the rate withheld. This documentation is obtained by the payee completing the appropriate Form W-8 (Form W-8BEN, Form W-8ECI, Form W-8EXP or Form W-8IMY). These forms and their instructions can be downloaded from http://www.irs.gov/. The applicable Form W-8 should completed by the payee and returned to the US entity prior to payment being made.; if the foreign entity does not provide the US entity with a completed Form W-8, then the U.S. entity must withhold at the highest applicable rate. In your fact situation, I believe you should be looking at Forms W-8ECI and W-8IMY and their instructions.
The US company is also responsible for remitting this withheld income tax to the U.S. Internal Revenue Service, and reporting the withholdings annually on Form 945 (due January 31 for the previous calendar year). In addition, the US entity must file Forms 1042, 1042-S and 1042-T by March 15th annually for the previous calendar year. A copy of Form 1042-S, which reports the revenue paid and the income tax withheld, if any, is also provided to the payee. The Forms 945 and 1042 series and their instructions may also be downloaded from http://www.irs.gov/. A Form 1042-S reporting the revenue paid must be filed with the US Internal Revenue Service (IRS) even if no income withholding tax was required.
Normally the withholding responsibility falls upon the US Corp. However, if the Netherlands Corp registers with the IRS as a "qualified intermediary" and withholding agent, then the Netherlands entity would provide the US Corp with Form W-8IMY, indicating their status as intermediary. The Netherlands Corp would also be required to obtain a completed Form W-8ECI from Customer X, the ultimate beneficiary of the revenue payment, withhold and remit the US income tax withholding, and file the applicable Forms 945, 1042, 1042-2 and 1042-T to report the tax withheld and revenue paid. As a "nonqualified intermediary" (one that is not registered with the IRS), the Netherlands entity is required to provide the US Corp with both Form W-8IMY for itself, and Form W-8ECI from the ultimate customer, and provide both forms to the US Corp. The US entity would then withhold appropriately based upon the information provided on the completed Forms W-8.
For further reading on this matter, I recommend that you start by reading Internal Revenue Service Publication 515, which may be downloaded from
http://www.irs.gov/pub/irs-pdf/p515.pdf. There is also information on the IRS website, along with links to relevant forms and instructions, at this link http://www.irs.gov/businesses/small/international/article/0,,id=104997,00.html.
As for the second part of your question, regarding the Luxemburg VAT, the US corp is required to withhold upon the gross amount paid to the foreign entity, absent an exemption claimed by a properly completed Form W-8.
For further information you can see US Internal Revenue Code Section 1441, 1442, 1443, and US Regulation Section 1.1441-1 definitions, and Regulations Section 1.1441-2 to 1.1441-9 as applicable. Section 1.1441-2 defines the income subject to withholding under section 1441, 1442, and 1443 and the regulations under these sections. Section 1.1441-3 provides rules regarding the amount subject to withholding. Section 1.1441-4 provides exemptions from withholding for, among other things, certain income effectively connected with the conduct of a trade or business in the United States, including certain compensation for the personal services of an individual. Section 1.1441-5 provides rules for withholding on payments made to flow-through entities and other similar arrangements. Section 1.1441-6 provides rules for claiming a reduced rate of withholding under an income tax treaty. Section 1.1441-7 defines the term withholding agent and provides due diligence rules governing a withholding agent's obligation to withhold. Section 1.1441-8 provides rules for relying on claims of exemption from withholding for payments to a foreign government, an international organization, a foreign central bank of issue, or the Bank for International Settlements. Sections 1.1441-9 and 1.1443-1 provide rules for relying on claims of exemption from withholding for payments to foreign tax exempt organizations and foreign private foundations.
I hope that this information helps you with your questions. Please contact me if you need further assistance.