Students create simple equation to fill in table

Hi. We have a very similar task for our students to the Picture Perfect Activity. I am wanting to create a page which has one column No. of Tables and the second is No. of chairs. The idea is that they are using pattern recognition to develop their own equation. I am looking to replicate the code on page 8. I’ve looked at the code but I can’t see where to get started. I have included a screenshot from picture perfect and what screen I want the students to interact with