The tree on the left is the true parameter, tree1 of Holmes and Huber (2019), Section 10.4.2. A base is drawn at the root and passed down every branch, changing according to a substitution model, which gives an alignment of six sequences (bottom). From the alignment we estimate the tree: Jukes-Cantor distances between the sequences, then neighbour joining, which repeatedly joins the pair with the smallest Q criterion (middle). Felsenstein's pruning algorithm gives the log-likelihood of any tree with branch lengths. Change the mutation rate: with too few mutations the sequences cannot tell the branches apart, with too many they are saturated and the signal of the old splits is overwritten (Question 10.9).
Simulation: the root base is drawn from the base frequencies π, and along a branch of length t (times the rate) a base stays with probability e−βt + (1 − e−βt)πi and otherwise becomes base j with probability (1 − e−βt)πj, with β = 1/(1 − Σπi2) (the F81 model; with equal π it is JC69). This is what the book's simSeq(..., bf = c(1,1,3,3)/8) does. Distances and likelihoods use JC69. The topology is "correct" when the Robinson-Foulds distance between the unrooted trees is 0.
code/ch10_networks_trees.R (Figures 10.15, 10.16 and 10.18; functions nj_mine and prune_loglik).