Assuming that you have a CY8CKIT-059 prototyping kit, downloaded and installed Creator 4.2.
I would suggest you to get a (or more) motor driver boards and sensors/ encoders.
Use an EZI2C component to implement the I2C slave.
Kindly refer to the project Joystick Controlled DC Motor w/H-Bridge in Hackster.io. Though it is for PSoC4 you can modify it for PSoC5LP. Do kindly let me know your preference for either PSoC4 or PSoC5LP.
You can find Code examples for I2C Slave on PSoC 3/4/5LP on PSoC 3/4/5 Code Examples webpage. Kindly perform a text search using "I2C Slave".