My end goal is I want to learn to create a script that can handle an escrow like service, where 2 parties can agree or disagree that the agreement is to satisfaction and if there is a disagreement then a third party can step in and mediate.
Not wanting to dull your thirst for knowledge... but isn't that sort of escrow scenario already handled by a simple 2-of-3 multisig wallet setup?

It's possible OP want to achieve more complex scenario such as after 90 days of escrow inactivity, the Bitcoin can be spent by seller alone