Please help! I don't know what to do... Or at least push for a decision...
1) read the specification PCF8575 chip: www.nxp.com/documents/data_sheet/PCF8575.pdf
2) pay special attention to the diagram on page 9 (WRITE mode (output)).
3) to understand that the task is required to output a data to port 0 value 0x2 (VD2 == 1, the rest 0), and the data to port 1 a value of 0x30 (VD5 and VD6 == 1, the rest 0).
4) understand that the A0..A2 chip will respond to the I2C address 0x24 (0x4 because A2 == 1 and 0x20 sewn, according to the chart on page 9).
5) apply to SDA and SCL signals so as to obtain the sequence S-0-1-0-0-1-0-0-0-A-0-0-0-0-0-0-1-0-A-0-0-1-1-0-0-0-0-A. How to do it -- look at figures 3, 4 and 6.