That depends on what [tex]U_n[/tex] is supposed to be. Most likely it refers to some sequence.
If [tex]U_n[/tex] is arithmetic, then each term in the sequence differs by a constant [tex]k[/tex] so that
[tex]U_n=U_{n-1}+k[/tex]
Then
[tex]U_{n+1}=U_n+k\implies U_{n+1}=U_{n-1}+2k[/tex]
and we find
[tex]40=10+2k\implies 2k=30\implies k=15[/tex]
and so
[tex]U_n=10+15=25[/tex]
On the other hand, if [tex]U_n[/tex] is geometric, then consecutive terms are scaled by some constant [tex]r[/tex] so that
[tex]U_n=rU_{n-1}[/tex]
Then
[tex]U_{n+1}=rU_n\implies U_{n+1}=r^2U_{n-1}[/tex]
[tex]\implies40=10r^2\implies r^2=30\implies r=\pm\sqrt{30}[/tex]
so there are two possible values for [tex]U_n[/tex],
[tex]U_n=\pm10\sqrt{30}[/tex]
If [tex]U_n[/tex] is some other type of sequence entirely, then this question would be impossible to answer without more information...