I don't understand the problem – the variable
a is definitely mutable. If you have a mutable borrow to it, you can modify it through
b, by dereferencing it. E.g. to set it to another string, write:
*b = String::from("another string");
However, it is a feature of Rust that you can only ever change a value from one place. That is, you can only have at most one mutable borrow at any point in time (and you might not have mutable and immutable borrows at the same time). That is half of the mechanism that prevents Rust programs from making memory management mistakes like double-free or iterator invalidation. Those errors arise from looking at an object while it is being changed.
In contrast, you can have any number of immutable borrows to the same object, because nothing can go wrong by merely observing the current, non-changing state of an object from several different places.