The Nextion instruction set can be found here
The format returned will be in 0X65 0X00 0X02 0X01 0XFF 0XFF 0XFF where:
65 indicates touch even data being returned
00 where this is Page 0
02 where this is component ID #2
01 where the component has been pressed, 00 has been released
FF FF FF indicating the end of data marker
With this information you can now have other logic on the other end of rx/tx to respond.
Your program on the rPi will have to listen for and catch these commands and respond to them. As far as I know the nextion to external mcu over rx/tx is in hexadecimal sent from the Nextion and received by the rPi, and in plaintext when sending from the rPi to the nextion.
Looking forward to seeing your demo. :)