android studio – How to join Firebase and MySQL?

My situation is as follows:
I have a school project where I make an application in android Studio. One of the features of my application is that I have an online discussion. The problem is that my teacher poses as a condition of my project that I could not use Firebase for connection or recording, so all other queries must be in MySQL. , and only the cat can be with Firebase. I had never used Firebase until today, I created a new online chat project and everything works fine. My question is how can I integrate it into my application? Can they work together?