I think it's usually a bad idea to call a raise with AJ unless it's suited ... and even then you could get into trouble. Ideally, you want to flop top 2 pair.

... Which you did. But then you bet too little on the flop. I would have bet at least $2 here. 2 pair is not something you want to slowplay, even top 2. (Sometimes I slowplay AK x 2 ... but it can really bite you in the ass.)

After that, the Q coming on the turn was just unfortunate for you.

After the raise on the turn, I think I would have check-called on the river.