Don't hesitate to start off with SmileBASIC, because BASIC is primarily for beginners.
BASIC stands for Beginner's All-purpose Symbolic Instruction Code.
Define the Z coordinate of your viewpoint as VZ as negative value (e.g. -64).
Like you've already known, distance to an object from your viewpoint and apparent size of an object are in inverse proportion to each other.
Therefore, you can define magnification ratio of an object with its Z coordinate as follows.
M=-VZ/(Z-VZ)
In this case, you should use real type variables instead of integer type as follows.
STICK OUT CX#,CY#
INC X#,CX#*10
DEC Y#,CY#*10
SPOFS SPRITES%[0],X#,Y#
If you don't write "OPTION DEFINT" on top of your program, variables don't need to be followed by "#"s.
I guess there are some mistakes in your screenshot as follows.
Line 6: too many "B"
Line 8: missing "("
Line 11: missing ","
Line 14: missing "["
Line 17-20: replace "*"s with "#"s
Line 25: INC has too much arguments
ASC(INKEY$()) gives you ASCII code of each key you press.
When you press enter key on the keyboard on bottom screen, it'll give you 13.
Try to execute the following program.
WHILE TRUE
VSYNC 1:ST$=INKEY$()
IF ST$!="" THEN ?ASC(ST$)
WEND