Entropy change during flow of heat
Entropy is a state function, which means its value does not depend on how it gets from state A to state B, rather it only depends on the final state B itself.  In this case, we can imagine a process which takes the system from state A to state B via a reversible process, and your expression for the change in entropy would be correct:
$$\Delta S = \frac{q_\text{rev}}{T_\text{sys}} - \frac{q_\text{rev}}{T_\text{surr}}$$
where I have explicitly labelled the heats as reversible heat flows (this quantity does depend on the path taken).
Even if in reality such a reversible path would not be taken, the final change in entropy would still have the same value, so it is still valid to use that expression.