This is the theme only from Sor’s famous duet Les deux amis op. 41 which he published in Paris in 1829/30. The work bears the name of Sor on one of the two guitar parts and the name of Aguado on the other, and the work was indeed performed in Paris by the two celebrated guitarists.
The complete score and parts for Sor’s Les deux amis op. 41 are available from Tecla Editions at www.tecla.com as part of the new 2019 second edition of Sor’s New Complete Works for Guitar edited by Brian Jeffery. For details about Sor’s music and his biography, please see www.tecla.com.