From man sh
-c string If the -c option is present, then commands are read from string.
If there are arguments after the string, they are assigned to the
positional parameters, starting with $0
It means your command should be like this:
$ sh -c 'echo $0'"$0"' foo
foo
Similarly:
$ sh -c 'echo $0"$0 $1'$1"' foo bar
foo bar
That was the first part to understand ,understand; the second case is simple and don'tdoesn't need explanation , iI guess.