idiom
hammer out a deal
Meaning
to reach an agreement after long discussion
Example
They spent hours to **hammer out a deal** that satisfied both sides.