I would guess it's getting stuck in this while loop:
while (!(b==Serial.readString())){
}
Try this instead:
while (true) {
String x =Serial.readString();
Serial.print("Received <");
Serial.print(x);
Serial.println(">");
if (b == x) break;
}