Complex sentence: Maranta was also both the friend and rival of Pietro Andrea Mattioli, with whom he competed upon the death of Ghini over who would inherit their teacher's papers and herbarium.
Split into simpler sentences: Maranta was also both the friend and rival of Pietro Andrea Mattioli. The two competed upon the death of Ghini over which of them would inherit their teacher's papers and herbarium.