First row: number of pieces with 3 squares or more = 5; number of squares missing = 8. 5x10+8=58.
Apply the same formular to the second row: 4x10+12=52.
I am sure there are other possibilities. E.g., the second row could also mean 412. If either of my answers is the one you have in mind, then I must be a good mind-reader.