When the passé composé is formed with the auxiliary avoir the past participle (or p.p. for short), in your example acheté, neither agrees with the subject nor - normally - with the direct object so long as the object is in its usual place behind the verb. You can see this in the first line "As-tu acheté des oranges ?" I have underlined the object, which is plural and feminine, yet the p.p. correctly does not agree with it. However, the p.p. must agree in number and gender with the direct object when the object is in front of the past participle. In French syntax this usually happens when the object is realized as a pronoun as is the case in the second line "Oui, je les ai *acheté " (the star indicates the word with the error).
So that's where the mistake is: Since the direct object les refers to oranges (fem, plur.) the p.p.must agree with it. This is a fairly common type of mistake since the object pronoun sometimes doesn't directly reflect gender or number so that one has to check back with the pronoun's referent.
I hope this helps. Post the corrected second line here and I will make sure you got it right, OK?