As a difficulty, there isn't any explanation. Also in the second table, three lines with zero output are omitted as well as the last four lines in both tables that have no existing input coding.
The most simple way to understand the tables is to solve the problem by yourself. You probably get similar tables and then you understand.
As a hint: The highest number, that must be represented in the result is 2*7, thus you need 4 bits for the results. As the PROM building block has two bits output, two PROMs are required. In the solution, #1 is the code table for the lower output bits (S1, S0) and #2 is the code table for the upper outbit bits (S3, S2).