First thing you will need is the right syntax for RSolve (note, RSolve, not Rsolve: Mathematica is case-sensitive). Here is the general case for the code you attempted:
RSolve[{x[1 + n] == b[1 + n] + \[Lambda] x[n],
b[1 + n] == \[Alpha] b[n]}, {x[n], b[n]}, n]
which gives the general solution:
{b[n] -> \[Alpha]^n C[1],
x[n] -> \[Lambda]^
n C[2] + (\[Alpha] (\[Alpha]^n - \[Lambda]^n) C[
1] UnitStep[-1 + n])/(\[Alpha] - \[Lambda])}
Or another way to do it in order to have parameters for x[0] and b[0] might be like this
RSolve[{x[1 + n] == b[1 + n] + \[Lambda] x[n],
b[1 + n] == \[Alpha] b[n], x[0] == x0, b[0] == b0}, {x[n], b[n]}, n]
which provides the explicit values for the constants C[1] and C[2] in the earlier case in the result:
{b[n] -> b0 \[Alpha]^n,
x[n] -> (-x0 \[Alpha] \[Lambda]^n + x0 \[Lambda]^(1 + n) -
b0 \[Alpha]^(1 + n) UnitStep[-1 + n] +
b0 \[Alpha] \[Lambda]^n UnitStep[-1 + n])/(-\[Alpha] + \[Lambda])}
If you want this in terms of [Lambda]=1+r, then all you need to do is perform that substitution using ReplaceAll
. But perhaps it'd have been easier to use [Lambda]=1+r explicitly in the original expression:
RSolve[{x[1 + n] == b[1 + n] + (1 + r) x[n],
b[1 + n] == \[Alpha] b[n], x[0] == x0, b[0] == b0}, {x[n], b[n]}, n]
Ok, given this, all you need to do to create an interactive solution would be to make use of Manipulate
. Here is a crude example--you can use this and the above to get started learning about these things, and the very best resource is to use the Documentation Center, starting with the simplest examples and working your way up.
Manipulate[
Grid[{{x[n],
N[1/(1 +
r - \[Alpha]) ((1 + r)^n x0 +
r (1 + r)^n x0 - (1 + r)^n x0 \[Alpha] +
b0 (1 + r)^n \[Alpha] UnitStep[-1 + n] -
b0 \[Alpha]^(1 + n) UnitStep[-1 + n])]},
{b[n], N[b0 \[Alpha]^n]}},
Alignment -> Left, Frame -> All],
{x0, 5000, InputField},
{b0, 400, InputField},
{\[Alpha], 1, InputField},
{n, 1, InputField},
{r, 10^-10, 1 - 10^-10}
]