Is there any way to know the coordinates of a 2d nth regular polygon when you have two of its coordinates/sides?
No, they don't need to be next to each other, however, you know which corner of the polygon both are located on.
It looks like we need to guess what you are trying to do. It would be much more helpful if you could make a specific, clear statement of the problem.
Maybe it's something like this: You want to make a regular heptagon (n=7), and you know the coordinates of two vertices that are separated by two edges, say (0,0) and (5,0). There will be one vertex between these, and four more on the other side. You want to find the coordinates of each of the other vertices of the heptagon. Would that be an example of what you want to do?
If so, then you might start by determining the central angle between the two known vertices (in this case, 2 times the angle between two adjacent vertices, which is 360/7 degrees). Then you can find the center of the polygon (that is, of the circle on which all the vertices lie), by making an isosceles triangle with the segment joining the given points as base. (Actually, there will be two such triangles; you have to decide which direction to go.) Once you've done that, you can make the circle around that center, and layout the required angle between each pair of vertices.
Note that none of this is just a formula we can give you; there are several formula you'll be using in the process, and several ways you might carry out the work, depending on exactly what you want to do.
Does that give you enough ideas?