All solutions here are SUGGESTED. Mr. Teng will hold no liability for any errors. Comments are entirely personal opinions.
Let X and Y denote the mass of a apple and pear in grams respectively.
Let A and B denote the mass of a peeled apple and peeled pear in grams respectively.