They are synonyms in some contexts.
I will comply WITH your requirements (implies a strict, technical meeting of specific instructions)
I will obey your command (Implies that the listener received a command, not necessarily a detailed instruction). As requirements are not instructions, they can not be obeyed.
I will observe your cultural traditions (the listener gives an ongoing commitment to conform to an accepted behaviour. It is a looser commitment, but a longer one. A tradition is neither a requirement, nor is it an instruction.
Usage where they are not interchangeable
"please observe as I chop the wood" The listener is requested to pay attention to how the wood is chopped, to learn how it is done.
"obey me and you will be rewarded" obey as an instruction. Observe would work here also.