Do you really need more than 50% mining power in order to attack Bitcoin blockchain?
A majority attack (51% attack) was given this name for a reason: in order for the attack to succeed on average, the attacker needs 51% of the hashpower.

Reading your question, I can see a misunderstanding of how mining works, in that you postulate two miners working together with 40% of the hashpower will outcompete 3 miners with 20% of the hashpower each (ie, 40% > 20%). This is false. 

Bitcoin mining is a memory-less process. This means that any single block header a miner creates has an equal chance of creating a valid hash - there is no advantage to having more hashpower, other than being able to make more guesses per second. A miner does not 'make progress' towards finding a new block, each hash is either valid, or not. 



An example using dice

As an example of a memory-less process, consider the act of rolling some dice. 

Lets consider a situation in which each di has 100 sides, and only 1 of those sides is considered a 'valid roll'. If there are 100 such dice in existence, and each of them is rolled once per second, then probability leads us to expect one valid roll per second. 

Now, lets consider your situation, in which 5 people each have 20 of the dice. We can see that, even if two people 'roll together', they will still only roll a 'valid roll' 40% of the time, whereas the other three people will roll a 'valid roll' 60% of the time, regardless of whether or not they are 'working together'.



Likewise, in your example we can see that the three miners with 60% of the hashpower will, on average, find more blocks than the two miners with 40% of the hashpower. This is simply because (20 + 20 + 20) > 40.

This may lead you to the question "then why would miners work together?" The answer is that by working together (using a 'mining pool'), a miner can expect less variance in their payout. See this answer for more info, and this answer is relevant as well.