I need some help to solve a query

I have two tables like this:

```
Source       Destination
------      -------------
  1              2
  2              3
  3              4
  3              5

```

When user will input `source = 1` and `destinaton = 5` then it should populate the following things

```
1        2
2        3
3        5

```