Let cost of 1 box of red pen = x
Let cost of 1 box of black pen = y
Gaga bought 5 red box and her sister 4 black box then total cost is given by
5x+4y
Given that total cost was $44
so equation will be 5x+4y=44...(i)
After exchange
Gaga= 4 red box + 1 Black box
Sister = 1 red box + 3 Black box
then cost for Gaga = 4x+1y
cost for sister = 1x+3y
Given that cost for both after exchange is same so we get
4x+1y = 1x+3y
or 4x-1x = 3y-1y
or 3x = 2y
or 3x/2=y ...(ii)
plug (ii) into (i)
5x+4y=44
5x+4(3x/2)=44
5x+12x/2=44
5x+6x=44
11x=44
x=4
Now plug value of x into (ii)
y=3x/2=3*4/2=12/2=6
Hence cost of 1 box of red pen = $4
And cost of 1 box of black pen = $6
---
If you want to get solution without solving both equations then just graph both equations and find the intersection point.
You will see that graph intersect at (4,6) which gives x=4, y=6