If two offshore companies both based on the same country (Gibraltar for example) are doing business together and the first company will do a payment to the second company then the transaction will be taxed as a local transaction or not?
That is true, most IBC's are not allowed to do business local.
On the other hand it will depend on what jurisdiction you setup these companies. Say Belize or Seychelles no one will give a f**k at what you are doing, it is really extremly easy to do what you want with companies there. The accounting and tax requirements there are bad because they are shitholes in regards to business.
Gibraltar and other European countries may be different.
You are right, Belize and Seychelles don't care at all about this aspect but my question is not about getting unnoticed while doing this, my question is if you 2 offshore companies from Gibraltar are conducting business outside Gibraltar are they subject to local taxes or not?
It looks like it doesn't matter how you formulate your question, according to the below your company get taxed with 10%:
All companies are chargeable for taxable profits at a rate of 10%, except for utility, energy and fuel supply companies and companies deemed to be abusing a dominant market position, which are subject to tax at a rate of 20%. Profits or gains of a company are only taxable if the income is “accrued in or derived from” Gibraltar. This is interpreted in terms of the location of the activities giving rise to the profits, subject to specific rules for inter-company interest income and royalty income