I have used a set radio buttons to check if it is a first or second value:
<form>
    <p>Select your choice to display value:</p>
    <div>
        <input type="radio" id="choice1" name="val" value="0" onchange="test()">
        <label for="choice1">First value</label>
        <input type="radio" id="choice2" name="val" value="1" onchange="test()">
        <label for="choice2">Second value</label>
    </div>
    <br>
    <select id="listboxtest" onchange="test()">
        <option value='10000|20000'> apples </option>
        <option value='20000|50000'> oranges </option>
        <option value='30000|20000'> pears </option>
    </select>
    <br><br>
    Result: <p id="result"></p>
</form>
<script src="test.js"></script>
test.js:
function test() {
    let a = document.getElementById("listboxtest").selectedIndex;
    let b = document.getElementById("listboxtest").options;
    let tokens = (b[a].value).split("|");
    let x = document.querySelector('input[name="val"]:checked').value;
    document.getElementById("result").innerHTML = tokens[x];
}
EDIT: 
Second Scenario
...what im trying to do now is , to just have one listbox and one button
  . the first value gets called on the onchange and the second value
  gets called when the user clicks the button. how could i do this ?
<body onload="test()">
<form>     
    <p>Select your choice or click button:</p>
    <select id="listbox" onchange="test(this.id)">
        <option value='apples'> apples </option>
        <option value='oranges'> oranges </option>
        <option value='pears'> pears </option>
    </select>
    <br><br>
    <button id="button" type="button" onclick="test(this.id)">Press</button>
    <br><br>
    Result: <p id="result"></p>
</form>
<script src="test.js"></script>
test.js:
function test(elementId = 'formload') {
    var selectionValues = [];
    selectionValues['apples'] = {first: 10000, second: 20000};
    selectionValues['oranges'] = {first: 20000, second: 50000};
    selectionValues['pears'] = {first: 30000, second: 20000};
    var listVal = document.getElementById("listbox").value;
    var result = null;
    switch(elementId) {
        case 'formload': // same as selected value of list box
                         // this is when the page is refreshed
        case 'listbox':
            result = selectionValues[listVal].first;
            break;
        case 'button':
            result = selectionValues[listVal].second;
            break;   
    }
    document.getElementById("result").innerHTML = result;
}