My ear tells me that in writing back says you have been writing all this time. You mean the time between the two correspondences, so I would use to write back.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.