Yes, they both can be on one run, up to 4 WC’s iirc. You can get a Y branch and a T branch, and this needs thought and planning.
Ideally you’d have a Y branch with a 135° male to female bend in it, which then picks up WC 2, so the flushed water is already heading in the direction of flow.
If you’re too tight for space to do this then you can use a T branch, but it should be lower than the outlet which is difficult to do with a standard, close-coupled WC.
If you’re using framed units (like a geberit) then it’s really easy as the pipe centre for the WC outlet is much higher than the standard 7” centre of a regular UK WC.
Best to get some fittings and see what will won’t work by doing some dry mock-ups.
Are you using framed (floating) wall hung or regular WC’s? Using one of these at WC 2 would make life a lot easier for you.