Firewall for duplex question

I own a 2 floor duplex that is divided in the middle with a straight continous firewall. I want to expand one of the duplex bedrooms farther into the other duplex. Can I have a vertical fire wall on the first floor then a horizontal firewall on inbetween the floors so that i can have another vertical firewall on the top floor that is offset from the bottom floor vertical firewall?

Thank you

Hi Joseph,

Really you should be consulting with your local authorities, not strangers on a home inspector message board.