Is it logical to wonder if 2 years on prednisone can be a contributing cause to a cancer?

No. There's no data that says that steroids are associated with cancer or that they contribute to a diagnosis.
Yes. Immunesuppression due to long term Prednisone can increase your risk for cancer. Discuss with your doctor if this may be the case for you.