Thank you for reply. You can use the split option. After selecting the boundary way, click on the node that should be a separating point, and click P button on your keyboard. You can find more details here: https://josm.openstreetmap.de/wiki/Help/Action/SplitWay