tl;dr:
1. public keys share a prime2. factor both keys3. generate private key4. decrypt ciphertext with first key
Full writeup here: https://github.com/p4-team/ctf/tree/master/2017-12-09-seccon-quals/crypto_ps_and_qs