Let the number of packages of hot dogs be D, and the number of packages of hamburgers be H. We can set up the equations:
1.60D + 5H = 23
D + H = 8 ---> which we can subtract D on both sides and get: H = 8 - D
1.6D + 40 - 5D = 23, -3.4D = -17, D = 5. The number of packages of hot dogs we buy are 5.
Now, we plug that into D + H = 8, and get 5 + H = 8. Subtracting by 5 on both sides of the equation, we get H = 3. So the number of packages of hamburgers we buy are 3.
---
Hope this helps!