In my experience architects generally avoid number theory.
Let's called the shared wall [tex]s[/tex]. The area is width times height, so the other walls are [tex]104/s[/tex] and [tex]130/s[/tex]. We want the biggest s that gives integer quotients; that would be the greatest common factor of 104 and 130.
[tex]104 = 2^3 13^1[/tex]
[tex]140 = 2^1 5^1 13^1[/tex]
Greatest common factor and largest shared wall,
[tex]w = 2 \times 13 = 26[/tex]
That's None of the Above, though 26x4 and 26x5 rooms are pretty goofy, probably why architects don't worry about number theory.