Chemical abundances of two extragalactic young massive clusters