Players on two-way contracts cannot be poached by other NBA teams. Gabriel and Williams are under contract with the Kings for the duration of their two-way deals. It is possible that those deals are two years long, but I have not heard that, and I don't think we have yet seen a player (on any team) sign a two-year two-way, so I would guess fairly confidently they are both one-year two-way deals.
Two-way players can be traded, just like regular players. I'm not sure on all of the specifics, but I think they are treated just like regular players in a deal. This would create for a bit more complication for two reasons. 1) NBA teams have only two two-way roster slots, so a team would not be able to trade for a two-way player if they already have two (and aren't trading one back) even if they had an otherwise empty roster spot, and 2) Two-way salaries are not written in stone, because they are pro-rated based on a lower, two-way salary when the player is with the G-League team and a higher, NBA-minimum salary when the player is with the NBA team. How the salary of a two-way player is dealt with when salary-matching in a trade is not clear to me. Two-way players actually do not count towards the salary cap, so their value for salary matching may be $0.
The team can convert a two-way contract to a minimum-salary NBA deal at any time (it's not like the player would object!) but of course would need to have a roster spot available. The team and player may also negotiate any other legal NBA deal and the two-way contract would be voided and replaced on signing that. However, note that a player converted from two-way to a regular NBA deal would be subject to a trade restriction, can't be traded for 3 months, so changing a two-deal to a full NBA deal to try to assist in salary matching for a trade is not possible.