I think when mutable borrowing and immutable borrowing are on the same line, the compiler should relax the restrictions here to allow compilation to pass, rather than forcing users to modify the code logic
The references test1 and test2 both return keep their input borrow alive. And println!() needs all interpolated values to be alive at the same time (it wraps both in a single struct before passing it to a function that performs the actual formatting), thus forcing both borrows of s to be kept alive at the same time.
For completeness, here's an example of methods with the same signatures given in the above example where calling any of them invalidates the reference returned by the other, showing that it's correct for your print statement to not compile: