Calculating Table Values from math input

In this “math lib” students will choose their own variables to create a unique linear equation word problem. In the table on slide 2 I want to automatically generate the values for y when x is 1 and 2, using the values from their math input on slide 1. Can someone show me how to have the table automatically calculate those answers?

The calculation would be based on y=mx+b, where m=text4a.numericValue and b=text2a.numeric value.

Here’s what I have so far: Linear Equation Mad Lib • Activity Builder by Desmos

You can create functions in CL. For tables, each cell will need to be coded individually.

m=text4a.numericValue
b=text2a.numericValue
f= simpleFunction(`${m}*x+${b}`)
#change cell coordinates as appropriate
cellContent(2,2): `${f.evaluateAt(1)}`
cellContent(3,2): `${f.evaluateAt(2)}`

Thank you so much! That worked!