However, all three use more or less the same writing system. So, I was wondering if Chinese who speak different languages use writing to communicate.
I'll start off by quoting a Wikipedia section on Vulgar Latin:
By its nature, Vulgar Latin varied greatly by region and by time period, though several major divisions can be seen. Vulgar Latin dialects began to significantly diverge from Classical Latin by the third century during the classical period of the Roman Empire. Nevertheless, throughout the sixth century, the most widely spoken dialects were still similar to and mostly mutually intelligible with Classical Latin. In terms of regional differences for the whole Latin period, "we can only glimpse a tiny amount of divergence with the actual written data. In texts of all kinds, literary, technical, and all others, the written Latin of the first five or six centuries A.D. looks as if it were territorially homogeneous, even in its 'vulgar' register. It is only in the later texts, of the seventh and eighth centuries, that we are able to see in the texts geographical differences that seem to be the precursors of similar differences in the subsequent Romance languages."
If you imagine an alternate universe where speakers of French, Spanish, Italian, etc. never wrote their own languages up until even now, but all wrote in Latin instead, then suddenly Italian culture became dominant in a politically unified Europe, subsequently basing a modern written standard on Italian, this provides a kind of analogy to China of today.
Yes, Chinese languages are traditionally written with the same writing system. However, the de-facto written standard was not in the different languages' vernacular; prior to the May Fourth Movement, written communication was done in Classical Chinese, while afterwards the national standard, called Standard Chinese, became based on a bunch of Mandarin languages.
To be clear, people who speak Hokkien, Cantonese, and Mandarin all write in the national standard as a Chinese lingua franca. Communication is not done by speakers of different languages writing in their own vernaculars such as Written Cantonese, Written Wu (Wikipedia site here), Written Gan (Wikipedia site here), etc, although in principle these vernaculars are highly readable with a minimal amount of training by non-speakers.
For example, if a Chinese tourist from one province is in a different one, do they write their questions down on a piece of paper when they need help from someone who does not speak their language?
Yes, they write their question down. No, they don't write the question in their own vernacular language, they write in Standard Written Chinese because the Chinese government mandates education in Standard Written Chinese across the country, no matter what the regional language is.