If $ax+by = a^n + b^n$ then $\left[\frac{x}{b}\right]+\left[\frac{y}{a}\right]=\left[\frac{a^{n-1}}{b}\right]+\left[\frac{b^{n-1}}{a}\right]$ 
Let a,b,n be positive integers such that $(a,b) = 1$.
Prove that if $(x,y)$ is a solution of the equation $ax+by = a^n + b^n$ then
$$\left[\frac{x}{b}\right]+\left[\frac{y}{a}\right]=\left[\frac{a^{n-1}}{b}\right]+\left[\frac{b^{n-1}}{a}\right]$$

So I was trying this question which is a Romania TST problem.
$$ax+by=a^n+b^n\implies a^n-ax=b^n-by\implies \frac{a^n-ax}{ab}=\frac{b^n-by}{ba}$$
$$\frac{a^{n-1}-x}{b}=\frac{b^{n-1}-y}{a}\implies \frac{a^{n-1}}{b}-\frac{x}{b}=\frac{b^{n-1}}{a}-\frac{y}{a}. $$
I don't think so we can proceed more.
We also have $a(a^n-ax)=b(b^n-y)\implies a^{n-1}\equiv x\mod b, b^{n-1}\equiv y\mod a.$
Any hints on how to proceed?
 A: As I stated in my comment, if $(x, y)$ is allowed to be any real solution, then \eqref{eq6A} will not always hold, so I'll assume that $x$ and $y$ must be integers. Also, I believe the square brackets are meant to represent the floor function, as I've seen being used elsewhere on this site.
Given the above, we can proceed from where you left off, i.e.,
$$a^{n-1} \equiv x \pmod{b} \tag{1}\label{eq1A}$$
$$b^{n-1} \equiv y \pmod{a} \tag{2}\label{eq2A}$$
Note \eqref{eq1A} means that $a^{n-1}$ and $x$ have the same remainder when divided by $b$, i.e., there's integers $i_1$, $i_2$ and $q$ where
$$a^{n-1} = i_{1}b + q, \; \; x = i_{2}b + q, \; \; 0 \le q \le b - 1 \tag{3}\label{eq3A}$$
Similarly with \eqref{eq2A}, there's integers $j_1$, $j_2$ and $r$ where
$$b^{n-1} = j_{1}a + r, \; \; y = j_{2}a + r, \; \; 0 \le r \le a - 1 \tag{4}\label{eq4A}$$
Using \eqref{eq3A} and \eqref{eq4A} in the given equation that $x$ and $y$ are a solution of gives
$$\begin{equation}\begin{aligned}
ax + by & = a^n + b^n \\
a(i_{2}b + q) + b(j_{2}a + r) & = a(i_{1}b + q) + b(j_{1}a + r) \\
ab(i_{2}) + aq + ab(j_{2}) + br & = ab(i_{1}) + aq + ab(j_{1}) + br \\
ab(i_{2}) + ab(j_{2}) & = ab(i_{1}) + ab(j_{1}) \\
i_{2} + j_{2} & = i_{1} + j_{1}
\end{aligned}\end{equation}\tag{5}\label{eq5A}$$
The equation you're asked to prove is
$$\left\lfloor \frac{x}{b} \right\rfloor + \left\lfloor \frac{y}{a} \right\rfloor =  \left\lfloor \frac{a^{n-1}}{b} \right\rfloor + \left\lfloor \frac{b^{n-1}}{a} \right\rfloor \tag{6}\label{eq6A}$$
Using the second parts of \eqref{eq3A} and \eqref{eq4A} in the left side of \eqref{eq6A} gives
$$\begin{equation}\begin{aligned}
\left\lfloor \frac{x}{b} \right\rfloor + \left\lfloor \frac{y}{a} \right\rfloor & = \left\lfloor \frac{i_{2}b + q}{b} \right\rfloor + \left\lfloor \frac{j_{2}a + r}{a} \right\rfloor \\
& = \left\lfloor i_2 + \frac{q}{b} \right\rfloor + \left\lfloor j_2 + \frac{r}{a} \right\rfloor \\
& = i_2 + j_2
\end{aligned}\end{equation}\tag{7}\label{eq7A}$$
while using the first parts of \eqref{eq3A} and \eqref{eq4A} in the right side of \eqref{eq6A} gives
$$\begin{equation}\begin{aligned}
\left\lfloor \frac{a^{n-1}}{b} \right\rfloor + \left\lfloor \frac{b^{n-1}}{a} \right\rfloor & = \left\lfloor \frac{i_{1}b + q}{b} \right\rfloor + \left\lfloor \frac{j_{1}a + r}{a} \right\rfloor \\
& = \left\lfloor i_1 + \frac{q}{b} \right\rfloor + \left\lfloor j_1 + \frac{r}{a} \right\rfloor \\
& = i_1 + j_1
\end{aligned}\end{equation}\tag{8}\label{eq8A}$$
The above $2$ equations show, using \eqref{eq5A}, that the $2$ sides of \eqref{eq6A} are always equal to each other.
Update: The problem can be generalized to, for any fixed integers $c$ and $d$, then for all integer solutions $(x, y)$ of
$$ax + by = ac + bd \tag{9}\label{eq9A}$$
by following the same procedure as in your question and in my answer above, and replacing $a^{n-1}$ with $c$ and $b^{n-1}$ with $d$, we can show that
$$\left\lfloor \frac{x}{b} \right\rfloor + \left\lfloor \frac{y}{a} \right\rfloor =  \left\lfloor \frac{c}{b} \right\rfloor + \left\lfloor \frac{d}{a} \right\rfloor \tag{10}\label{eq10A}$$
A: We will prove John's final observation:

If $a, b$ are co-prime positive integers, and $ c, d, x, y$ are integers such that $ax+by = ac + bd$, then
$$\left\lfloor \frac{x}{b} \right\rfloor + \left\lfloor \frac{y}{a} \right\rfloor =  \left\lfloor \frac{c}{b} \right\rfloor + \left\lfloor \frac{d}{a} \right\rfloor. $$

As observed by Teresa, the statement is true without the floor brackets, so with the floor brackets, we know that the values are very close.
Subtracting from $ \frac{x}{b} + \frac{y}{z} = \frac{c}{b} + \frac{d}{a}$, the observation is equivalent to demonstrating:
$$\left\{ \frac{x}{b} \right\} + \left\{ \frac{y}{a} \right\} =  \left\{ \frac{c}{b} \right\} + \left\{ \frac{d}{a} \right\}. $$
Since $ a (x-c) = b (y-d)$ and $ \gcd(a, b) = 1$, so $ b \mid x - c$, and thus $\left\{ \frac{x}{b} \right\} = \left\{ \frac{c}{b} \right\}. $ In fact, it is equal to $\frac{ x \pmod{b} } { b}$.
Likewise, $ a \mid y-d$, and thus $\left\{ \frac{y}{a} \right\} = \left\{ \frac{d}{a} \right\}$.
Adding up these equalities, we get the desired result.
