B=number of buckets and M=number of mugs. 8B+5M=92; 5B+8M=77. Multiply first equation by 8 and the second by 5: 64B+40M=736; 25B+40M=385. We can subtract the latter equation from the former: 39B=351. So B=351/39=9.
So one bucket costs R9. To find out how much a mug costs go back to the original equations and pick one to substitute for B: let's pick the second: 45+8M=77, so 8M=77-45=32 and 8M=32, making M=R4.
3B+2M=3*9+2*4=27+8=R35.