I had this issue with different colored wires. Basically, I killed the breaker, pulled everything out of the old switch (did photos and labels on old setup) then flipped the breaker on. Tested for line voltage. Labeled it. Cut power. Reattached it and the wire that was the load (process of elimination by looking at the colors in each box). Tested that. Then I knew for certain. Killed power. Wired up the new master in the 3-way. Took off the wires on the slave. Switched power on. Turned on new master. Tested again, so I knew what was what. Cut power. Tied the line/load circuit into the slave box and attached neutral and traveler to the switch. Power on. Made sure it all worked, cut power, screwed them in. Beyond basic safety, once you fry a smart switch because you got careless or guessed, you don’t make that expensive mistake again.