read by default reads words from its input into variables.
`cmd`, the ancient form of $(...) captures the output of a command. By default, read doesn't produce any output. The text you see when you type something to be read by read is the echo of the terminal device, it's not output by read¹.
Some read implementations can output what they read. For instance, zsh's read builtin can do that with -e or -E (the latter to also store the input in variables in addition to echoing it back).
So in zsh:
echo "my name is=$(read -e) and am from $(read -e)"
Portably, you can read a line of input (as opposed to the special reading behaviour of read) and output it back with head -n1. However note that if standard input is not a terminal device or a seekable file, most head implementations would read more than one line.
Many systems also still have a line command for that (used to be standard, later deprecated).
echo "my name is=$(line) and am from $(line)"
Which should read one byte at a time, so not read more than one line of input.
If not available, you can always emulate that line with read:
line() {
IFS= read -r line
ret=$?
printf '%s\n' "$line" || return "$ret"
}
Or even make it a
prompt() {
printf >&2 %s "$1"
IFS= read -r answer
printf '%s\n' "$answer"
}
printf '%s\n' "my name is=$(
prompt "What is your name? ") and am from $(
prompt "Where are you from? ")"
(here using printf instead of echo as echo can generally not be used for arbitrary data).
(same as zsh's IFS= read -re '?What is your name? ').
For completeness, with csh or tcsh, you can do:
printf '%s\n' "my name is=$< and am from $<"
$< being csh's way to read input into a variable.
If you wanted to repeat that for every two lines of input, it would be better to use a text processing utility like awk:
awk '{name=$0; getline place; print "my name is="name" and am from "place}'
¹ unless read is configured to implement a line editor by itself like with read -e in bash or by setting the emacs, gmacs or vi option in ksh93 (and stdin is a terminal device), but then read would output the echo on stderr, not stdout.