This issue comes under the heading of what the fuqaha’ call “the opportunity to take what is your right (from someone who refuses to give it)”. What this means is that, if someone wronged you by taking something from you unlawfully or denying you your rights or causing a delay in giving them to you, but you do not have any evidence to prove it, and you have the opportunity to take from him something equivalent to what he owes you in such a way that you will be safe from being found out and punished, do you have the right to take what is due to you or not?
This is a matter concerning which there was a difference of scholarly opinion. Some of the scholars say that it is permissible, others say that it is haraam, and yet others differentiate according to circumstances.
See: Sharh Mukhtasar Jaleel by al-Kharashi, 7/235; al-Fataawa al-Kubra, 5/407; Tarh al-Tathreeb, 8/226-227; Fath al-Baari, 5/109; al-Mawsoo‘ah al-Fiqhiyyah, 29/162
The correct view is to take a moderate approach. If the issue is clear-cut, then the view that it is permissible is more likely to be correct. This is different from cases where the claim is not clear-cut; in that case the dispute should be sorted out in the courts.
Ibn al-Qayyim (may Allah have mercy on him) said:
With regard to the issue of “the opportunity to take what is your right (from someone who refuses to give it)”, some of the scholars allowed it in all cases and some forbade it altogether. Others took a moderate approach and said: If the issue is clear-cut, such as cases of maintenance on the basis of marriage, ties between parents and children, or ownership of a slave, that makes it obligatory to spend on maintenance, then he (the one who is owed maintenance) may take as much as he is entitled to without telling him (the one who owes him maintenance). If the matter is not clear-cut, such as cases involving loans or the price of sold items and the like, he does not have the right to take (his dues) unless he tells him. This is the fairest opinion concerning this matter and it is what is clearly indicated by the Sunnah.
I‘laam al-Muwaqqi‘een, 4/21
See also the answer to question no. 138048
Based on that, if your colleague does not differ with you with regard to the cost of this extra work that is the point of your question, and he accepts that it was additional to the project that you had agreed upon, and the dispute rather is with the rest of his partners who do not accept that, and he is the general manager and is the one who made a deal with you concerning this work – in that case it is permissible for you to deduct your dues from his profit.
But if he does not accept that it was extra (to the original agreement) or he disputes the cost, then you have no choice but to refer the matter to the courts.
And Allah knows best.