[x] is just a name given to the output of the filter.
Please read the respective documentation entry and also the part about link labels.
Usually, a simple filter takes one or more filters and puts them into a filter chain. This is the case in your first command.
You have a complex filter in the second command where there can be multiple filter chains combined into a filter graph, as you are processing multiple input streams. The first chain applies
scale to the first input video, and the second chain applies the
paletteuse filter to the output of the first filterchain and the second input image.
Each filterchain can have zero or more inputs, and zero or more outputs. In a complex filter, you usually have to tell
ffmpeg what these inputs and outputs are for each of the filter chains. This is what the
[x] says, the output of the
scale filter chain is called
x. Later, it can be re-used as an input for the
paletteuse filter chain. You don't have to use
x; you can use any other name as well – something more descriptive would make sense, like