Multimessenger astronomy with pulsar timing and X-ray observations of massive black hole binaries