Enthalpy is thought as the total potential energy of a system. The actual thermodynamic equation for enthalpy is:
ΔH=ΔU+Δ(pV)Q on the other hand is actually a different thing to enthalpy. Q refers to the heat transfer of a system. Note that this means that q can be positive or negative (if heat energy moves from the system to the surroundings) and hence it is not always positive. The correct formula for heat transfer is:
q=ΔU−wThe equation that your teacher has given you is actually an equation for heat transfer, not for enthalpy change. However because enthalpy equals heat transfer in most cases, it is commonly said that enthalpy change also equals to that equation. However the one mistake is that there shouldn't be a minus in the equation for enthalpy change. The equation for heat transfer and enthalpy should both be the same.