-
If $X$ and $Y$ are perfect substitutes such that a unit of $X$ can be replaced by $n$ units of $Y$ [...] I know [...] $U=b(nx+y)$ for this case
This is a possible representation but not the only one. E.g., $\tilde{U}=(nx+y)^2$ represents the same preferences.
-
how do we arrive at that?
Perfect substitutes (with a substitution ratio of $1:n$) defines a preference relation $\succeq$ over the baskets of goods. A possible definition of the perfect substitutes preference relation over $\mathbb{R}^2$ is that the relation fulfills the following two properties:
i) $(x_1,y_1) \sim (x_2,y_2) \text{ iff } nx_1 + y_1 = nx_2 + y_2$
ii) monotonicity
Though ii) is generally implied, it is not strictly necessary - e.g., two bads can also be perfect subtitutes.
As I already pointed it out above, there are many utility functions that represent this preference.
-
can we say that any function $U$ satisfying $U(x+1,y) = U(x,y+n)$ will describe this relation [...]?
If you restrict yourself to integer numbers, sure. A possible reformulation of
$$(x_1,y_1) \sim (x_2,y_2) \text{ iff } nx_1 + y_1 = nx_2 + y_2$$
is
$$(x_1,y_1) \sim (x_2,y_2) \text{ iff } n(x_1-x_2) = y_2-y_1$$
which is indeed fulfilled by the equation above.
history-of-economic-thought
question, are you asking who first defined perfect substitutes and how? $\endgroup$